30 lines
797 B
Diff
30 lines
797 B
Diff
|
From 1cd485edb996ab3c52e8501d452de00e0be3b092 Mon Sep 17 00:00:00 2001
|
||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||
|
Date: Tue, 9 Nov 2010 17:04:04 +0100
|
||
|
Subject: [PATCH] curl: bz650255
|
||
|
|
||
|
---
|
||
|
lib/ftp.c | 6 ++++++
|
||
|
1 files changed, 6 insertions(+), 0 deletions(-)
|
||
|
|
||
|
diff --git a/lib/ftp.c b/lib/ftp.c
|
||
|
index d79878e..416e5ec 100644
|
||
|
--- a/lib/ftp.c
|
||
|
+++ b/lib/ftp.c
|
||
|
@@ -425,6 +425,12 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
|
||
|
if(ftpcode)
|
||
|
*ftpcode = code;
|
||
|
|
||
|
+ if(421 == code)
|
||
|
+ /* 421 means "Service not available, closing control connection." and FTP
|
||
|
+ * servers use it to signal that idle session timeout has been exceeded.
|
||
|
+ * If we ignored the response, it could end up hanging in some cases. */
|
||
|
+ return CURLE_OPERATION_TIMEDOUT;
|
||
|
+
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
1.7.2.3
|
||
|
|