Commit 5f9cbc42 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Only shut down SSL if the CCC command succeeded.

parent 3239f059
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -2560,6 +2560,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
      break;

    case FTP_CCC:
      if (ftpcode < 500) {
	/* First shut down the SSL layer (note: this call will block) */
	result = Curl_ssl_shutdown(conn, FIRSTSOCKET);

@@ -2567,6 +2568,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
	  failf(conn->data, "Failed to clear the command channel (CCC)");
	  return result;
	}
      }

      /* Then continue as normal */
      result = ftp_state_pwd(conn);