lib/url.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/url.c b/lib/url.c
index 357f213..e504188 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2831,6 +2831,11 @@ ConnectionExists(struct SessionHandle *data,
check->data = data;
infof(data, "Connection #%ld seems to be dead!\n", i);
+ if(check->protocol & PROT_FTP)
+ /* FTP: avoid sending QUIT and waiting for response on a dead
+ * connection */
+ check->proto.ftpc.ctl_valid = FALSE;
+
Curl_disconnect(check); /* disconnect resources */
data->state.connc->connects[i]=NULL; /* nothing here */