[Qt-interest] QFtp will not timeout

Alan jkabeal-qt at yahoo.com
Sat Nov 14 02:45:59 CET 2009


Thanks for the quick reply.
This is a good workaround to abort the command after n seconds.
I believe this is a bug. So I will file with Nokia.
It could also be that they might not fix it, since they are not putting much effort into
QFtp/QHttp classes.
Alan

--- On Fri, 11/13/09, Scott Aron Bloom <Scott.Bloom at sabgroup.com> wrote:

From: Scott Aron Bloom <Scott.Bloom at sabgroup.com>
Subject: Re: [Qt-interest] QFtp will not timeout
To: qt-interest at trolltech.com
Date: Friday, November 13, 2009, 8:35 PM




 
 






This also exists in QHttp, and the QNetworkAccessManager… 

   

My solution is to do the following: 

   

QTimer::singleShot( XXXX, ftp, SLOT( abort() ) ) ) 

   

Call that after you call the “command” on ftp or the
post on http type commands. 



Scott 

   



From:
qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On
Behalf Of Alan

Sent: Friday, November 13, 2009 5:23 PM

To: qt-interest at trolltech.com

Subject: [Qt-interest] QFtp will not timeout 



   


 
  
  My program sends and receives files using QFtp.

  If I try to connect to an ftp site using an IP address while my computer is
  not connected

  to the internet, the connect hangs.

  I also tried the QFtp demo program and observed the same behavior.

  If I use the windows ftp program in a command window I receive an error right
  away.

  I also tried QTcpSocket since QFtp uses QAbstractSocket and I received a

  no 'route to host' error right away as expected.

  So it looks like it is QFtp that just does not timeout as it should.

  Any one else seen this issue?

  Platform: Windows XP sp3

  Thanks,

  Alan 
  
 


   



 


-----Inline Attachment Follows-----

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091113/db12214e/attachment.html 


More information about the Qt-interest-old mailing list