CLOSESOCKETFUNCTION: added
Introduced the initial setup to allow closesocket callbacks by making sure sclose() is only ever called from one place in the libcurl source and still run all test cases fine.
This commit is contained in:
@@ -2185,7 +2185,7 @@ static CURLcode Curl_do_perform(struct SessionHandle *data)
|
||||
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
|
||||
/* if we failed anywhere, we must clean up the secondary socket if
|
||||
it was used */
|
||||
sclose(conn->sock[SECONDARYSOCKET]);
|
||||
Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
|
||||
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user