libssh2: fix return code for EAGAIN

In disconnect

Closes #18874
This commit is contained in:
Daniel Stenberg 2025-10-06 11:03:35 +02:00
parent 6f0e212f6e
commit 5090cce01c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -2574,7 +2574,7 @@ static CURLcode ssh_state_session_disconnect(struct Curl_easy *data,
if(sshc->ssh_channel) {
rc = libssh2_channel_free(sshc->ssh_channel);
if(rc == LIBSSH2_ERROR_EAGAIN)
return CURLE_OK;
return CURLE_AGAIN;
if(rc < 0) {
char *err_msg = NULL;