diff options
-rw-r--r-- | lib/ssh.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -306,6 +306,7 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done) return CURLE_FAILED_INIT; } #ifdef CURL_LIBSSH2_DEBUG + libssh2_trace(ssh->ssh_session, LIBSSH2_TRACE_CONN|LIBSSH2_TRACE_TRANS|LIBSSH2_TRACE_SCP|LIBSSH2_TRACE_SFTP|LIBSSH2_TRACE_ERROR); infof(data, "SSH socket: %d\n", sock); #endif /* CURL_LIBSSH2_DEBUG */ @@ -608,6 +609,9 @@ CURLcode Curl_scp_done(struct connectdata *conn, CURLcode status, scp->path = NULL; if (scp->ssh_channel) { + if (conn->data->set.upload && libssh2_channel_send_eof(scp->ssh_channel) < 0) { + infof(conn->data, "Failed to send libssh2 channel EOF\n"); + } if (libssh2_channel_close(scp->ssh_channel) < 0) { infof(conn->data, "Failed to stop libssh2 channel subsystem\n"); } |