Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 24559:f059d5435d65 legacy-trunk
GvR provided solution to the socket rebinding timeout problem.
M PyShell.py
M rpc.py
M run.py
| author | Kurt B. Kaiser <kbk@shore.net> |
|---|---|
| date | Mon, 05 Aug 2002 03:52:10 +0000 |
| parents | 0e27b67247da |
| children | 6b67d26079f2 |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Mon Aug 05 01:49:16 2002 +0000 +++ b/Lib/idlelib/PyShell.py Mon Aug 05 03:52:10 2002 +0000 @@ -198,16 +198,14 @@ args = [sys.executable] + w + ["-c", "__import__('run').main()", str(port)] self.rpcpid = os.spawnv(os.P_NOWAIT, args[0], args) - # Idle starts listening for connection on localhost, retry since - # Idle may be restarted before port is available for rebinding - # XXX 25 July 2002 KBK Find out what is causing the delayed release! - for i in range(12): + # Idle starts listening for connection on localhost + for i in range(6): time.sleep(i) try: self.rpcclt = rpc.RPCClient(addr) break except socket.error, err: - if i < 5: + if i < 3: print>>sys.__stderr__, ". ", else: print>>sys.__stderr__,"\nIdle socket error: " + err[1]\
