diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -2560,12 +2560,14 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) break; case FTP_CCC: - /* First shut down the SSL layer (note: this call will block) */ - result = Curl_ssl_shutdown(conn, FIRSTSOCKET); - - if(result) { - failf(conn->data, "Failed to clear the command channel (CCC)"); - return result; + if (ftpcode < 500) { + /* First shut down the SSL layer (note: this call will block) */ + result = Curl_ssl_shutdown(conn, FIRSTSOCKET); + + if(result) { + failf(conn->data, "Failed to clear the command channel (CCC)"); + return result; + } } /* Then continue as normal */ |