aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-02-09 15:36:36 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-02-09 15:36:36 +0100
commitb370fcd300902d1310696088decf53ee2a286b95 (patch)
tree7f84a1619fee6ef9de0e3387f8f92ad96500ff63 /lib
parent5348e8f276dac01e98f3c1e3fcdfa363f1df6cf8 (diff)
CURLOPT_SOCKOPTFUNCTION: return proper error code
When the callback returns an error, this function must make sure to return CURLE_ABORTED_BY_CALLBACK properly and not CURLE_OK as before to allow the callback to properly abort the operation.
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index bcc1ed74a..fb21fb7df 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -926,7 +926,7 @@ singleipconnect(struct connectdata *conn,
CURLSOCKTYPE_IPCXN);
if(error) {
sclose(sockfd); /* close the socket and bail out */
- return res;
+ return CURLE_ABORTED_BY_CALLBACK;
}
}