Rev 15 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 27 | magnus | 1 | Author: Ron Bentley <rtbentley@gmail.com> |
| 2 | Bug-Debian: http://bugs.debian.org/473598 |
||
| 3 | Description: Lower connection timeout when building server list |
||
| 4 | to avoid hanging for a long time when one or more servers are unresponsive. |
||
| 15 | magnus | 5 | |
| 6 | --- pyscrabble-1.6.2~/pyscrabble/gui/register.py 2008-04-20 23:14:07.000000000 -0400 |
||
| 7 | +++ pyscrabble-1.6.2/pyscrabble/gui/register.py 2008-04-20 23:18:25.000000000 -0400 |
||
| 8 | @@ -62,6 +62,9 @@ |
||
| 9 | return |
||
| 10 | |||
| 11 | self.serverList.clear() |
||
| 12 | + |
||
| 13 | + defTimeout = socket.getdefaulttimeout() |
||
| 14 | + socket.setdefaulttimeout(6) |
||
| 15 | |||
| 16 | for host,g_port,w_port,location in self.servers: |
||
| 17 | |||
| 18 | @@ -73,6 +76,8 @@ |
||
| 19 | numUsers="N/A" |
||
| 20 | |||
| 21 | self.serverList.append( (host,location, numUsers) ) |
||
| 22 | + |
||
| 23 | + socket.setdefaulttimeout(defTimeout) |
||
| 24 | |||
| 25 | self.toolBar.set_sensitive(True) |
||
| 26 |