mirror of
https://github.com/curl/curl.git
synced 2026-08-03 21:00:55 +03:00
cfilter: provide call to tell connection to forget a socket
- fixed libssh.c workaround for a socket being closed by the library - eliminate the terrible hack in cf-socket.c to guess when this happened and try not closing the socket again. - fixes race in eyeballing when socket could have failed to be closed for a discarded connect attempt Closes #12207
This commit is contained in:
parent
39547ae64d
commit
37b5cf4fa0
4 changed files with 31 additions and 31 deletions
|
|
@ -1963,10 +1963,9 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
ssh_disconnect(sshc->ssh_session);
|
||||
if(!ssh_version(SSH_VERSION_INT(0, 10, 0))) {
|
||||
/* conn->sock[FIRSTSOCKET] is closed by ssh_disconnect behind our back,
|
||||
explicitly mark it as closed with the memdebug macro. This libssh
|
||||
tell the connection to forget about it. This libssh
|
||||
bug is fixed in 0.10.0. */
|
||||
fake_sclose(conn->sock[FIRSTSOCKET]);
|
||||
conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;
|
||||
Curl_conn_forget_socket(data, FIRSTSOCKET);
|
||||
}
|
||||
|
||||
SSH_STRING_FREE_CHAR(sshc->homedir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue