Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 15 | Blame | Compare with Previous | Last modification | View Log | RSS feed

Author: Ron Bentley <rtbentley@gmail.com>
Bug-Debian: http://bugs.debian.org/473598
Description: Lower connection timeout when building server list
 to avoid hanging for a long time when one or more servers are unresponsive.

--- pyscrabble-1.6.2~/pyscrabble/gui/register.py        2008-04-20 23:14:07.000000000 -0400
+++ pyscrabble-1.6.2/pyscrabble/gui/register.py 2008-04-20 23:18:25.000000000 -0400
@@ -62,6 +62,9 @@
             return
         
         self.serverList.clear()
+
+        defTimeout = socket.getdefaulttimeout()
+        socket.setdefaulttimeout(6)
         
         for host,g_port,w_port,location in self.servers:
             
@@ -73,6 +76,8 @@
                 numUsers="N/A"
             
             self.serverList.append( (host,location, numUsers) )
+
+        socket.setdefaulttimeout(defTimeout)
         
         self.toolBar.set_sensitive(True)