[issue2132] Blocking sockets take entirely too long to timeout

2008-03-19 Thread Sean Reifschneider
Sean Reifschneider <[EMAIL PROTECTED]> added the comment: smtplib is for sending messages via SMTP, not for testing to see if a user is behind an ISP that is incorrectly blocking outgoing SMTP connections. I would argue the "incorrectly" because they are dropping rather than rejecting the connec

[issue2132] Blocking sockets take entirely too long to timeout

2008-02-17 Thread Martin v. Löwis
Martin v. Löwis added the comment: I recommend that you stay with non-blocking sockets, and use select/poll on all sockets. Then you can simultaneously check multiple servers, and select will tell you which ones you got connected to. For this application, putting a time-out on the socket and doin

[issue2132] Blocking sockets take entirely too long to timeout

2008-02-17 Thread Nathan Duran
New submission from Nathan Duran: The following code: import smtplib test = smtplib.SMTP('mail.host.com') will hang the entire script for about ten minutes when run on a machine which is connected to the internet via an ISP who blocks port 25 (which is pretty much all of them these days). Cl