Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
15 | magnus | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run |
2 | ## 20_serverlist_timeout.dpatch by Ron Bentley <rtbentley@gmail.com> |
||
3 | ## |
||
4 | ## DP: Lower connection timeout when building server list to avoid |
||
5 | ## DP: hanging for a long time when one or more servers are unresponsive. |
||
6 | |||
7 | @DPATCH@ |
||
8 | |||
9 | --- pyscrabble-1.6.2~/pyscrabble/gui/register.py 2008-04-20 23:14:07.000000000 -0400 |
||
10 | +++ pyscrabble-1.6.2/pyscrabble/gui/register.py 2008-04-20 23:18:25.000000000 -0400 |
||
11 | @@ -62,6 +62,9 @@ |
||
12 | return |
||
13 | |||
14 | self.serverList.clear() |
||
15 | + |
||
16 | + defTimeout = socket.getdefaulttimeout() |
||
17 | + socket.setdefaulttimeout(6) |
||
18 | |||
19 | for host,g_port,w_port,location in self.servers: |
||
20 | |||
21 | @@ -73,6 +76,8 @@ |
||
22 | numUsers="N/A" |
||
23 | |||
24 | self.serverList.append( (host,location, numUsers) ) |
||
25 | + |
||
26 | + socket.setdefaulttimeout(defTimeout) |
||
27 | |||
28 | self.toolBar.set_sensitive(True) |
||
29 |