Bug 31000

Summary: ftp://something never times out
Product: [Frameworks and Libraries] kio Reporter: hrabe
Component: ftpAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: thiago
Priority: NOR    
Version: 3.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description hrabe 2001-08-18 19:49:37 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konqueror
Version:           3.0 (using KDE 2.2.0 )
Severity:          normal
Installed from:    compiled sources
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
OS:                Linux (i686) release 2.4.3-12
OS/Compiler notes: 

When trying to reach a (possibly
unresponsive) FTP link such as
ftp://ftp.something.org/ when the 
link is clicked the wheel logo spins
very long (at least several minutes) with
no response but also no timeout. Only
the Stop Loading button stops it.

Thanks
Honza

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Thiago Macieira 2003-03-03 15:13:01 UTC
It does time out, but it takes an awfully long time, depending on your kernel. 
 
In my system, I think it too 3 minutes. I'm going to add a timeout to the ioslave. 
Comment 2 Thiago Macieira 2003-03-03 15:13:28 UTC
Subject: kdelibs/kioslave/ftp

CVS commit by thiago: 

Adding a timeout to the FTP connection, set to a minute.
This also fixes the non-bug #31000.
This should be backported to 3.1 too.
CCMAIL: 31000@bugs.kde.org


  M +2 -1      ftp.cc   1.176


--- kdelibs/kioslave/ftp/ftp.cc  #1.175:1.176
@@ -336,4 +336,5 @@ bool Ftp::connect( const QString &host, 
       return false;
     }
+  ksControl->setTimeout(60);    // a minute should be enough
   if (ksControl->connect() < 0)
     {


Comment 3 Thiago Macieira 2003-03-03 15:15:21 UTC
*** Bug has been marked as fixed ***.