Re: Little bug: Timeout not working when no data on control connection
"Alexander V. Lukyanov" <[email protected]>
| Newsgroups | gmane.network.lftp.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 23, 2004 at 04:13:10PM +0200, Tillmann Steinbrecher wrote: > When lftp gets a connection on on the control connection, but no actual > data is received, it hangs at [FEAT negotiation...]. In this state, > timeouts are not working; even if net:timeout is set, it will hang. Please try this patch. -- Alexander.
diff
(text/plain, 1 KB)
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.333
diff -u -p -r1.333 ftpclass.cc
--- ftpclass.cc 22 Jul 2004 05:31:53 -0000 1.333
+++ ftpclass.cc 26 Jul 2004 11:28:39 -0000
@@ -1343,7 +1343,7 @@ int Ftp::Do()
return MOVED;
if(expect->Has(Expect::FEAT))
- return m;
+ goto usual_return;
#ifdef USE_SSL
if(QueryBool((user && pass)?"ssl-allow":"ssl-allow-anonymous",hostname)
@@ -1464,7 +1464,7 @@ int Ftp::Do()
if(expect->Has(Expect::FEAT)
|| expect->Has(Expect::OPTS_UTF8)
|| expect->Has(Expect::LANG))
- return m;
+ goto usual_return;
if(!conn->utf8_activated && charset && *charset)
conn->SetControlConnectionTranslation(charset);
@@ -2095,7 +2095,7 @@ int Ftp::Do()
case PASV_HTTP_PROXY_CONNECTED:
if(HttpProxyReplyCheck(conn->data_iobuf))
goto pre_data_open;
- return m;
+ goto usual_return;
}
pre_data_open: