Skip to content

Commit 55f8757

Browse files
committed
Issue #13300: Fix IDLE Restart Shell command failure introduced by
3a5a0943b201. Do not close listening socket on subprocess restart.
1 parent deb925f commit 55f8757

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Lib/idlelib/PyShell.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,10 @@ def interrupt_subprocess(self):
459459
threading.Thread(target=self.__request_interrupt).start()
460460

461461
def kill_subprocess(self):
462+
try:
463+
self.rpcclt.listening_sock.close()
464+
except AttributeError: # no socket
465+
pass
462466
try:
463467
self.rpcclt.close()
464468
except AttributeError: # no socket

Lib/idlelib/rpc.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,6 @@ def accept(self):
534534
def get_remote_proxy(self, oid):
535535
return RPCProxy(self, oid)
536536

537-
def close(self):
538-
self.listening_sock.close()
539-
SocketIO.close(self)
540-
541537
class RPCProxy(object):
542538

543539
__methods = None

0 commit comments

Comments
 (0)