Blame | Last modification | View Log | RSS feed
#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_serverlist_timeout.dpatch by Ron Bentley <rtbentley@gmail.com>
##
## DP: Lower connection timeout when building server list to avoid
## DP: hanging for a long time when one or more servers are unresponsive.
@DPATCH@
--- 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)