Issue #13300: Fix IDLE Restart Shell command failure introduced by
3a5a0943b201.  Do not close listening socket on subprocess restart.
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 33deb45..ea3a5d9 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -460,6 +460,10 @@
 
     def kill_subprocess(self):
         try:
+            self.rpcclt.listening_sock.close()
+        except AttributeError:  # no socket
+            pass
+        try:
             self.rpcclt.close()
         except AttributeError:  # no socket
             pass