--- a/eric6/Debugger/DebuggerInterfacePython.py Thu Feb 04 20:15:06 2021 +0100 +++ b/eric6/Debugger/DebuggerInterfacePython.py Fri Feb 05 08:16:14 2021 +0100 @@ -59,6 +59,7 @@ self.__master = None self.__connections = {} self.__pendingConnections = [] + self.__inShutdown = False # set default values for capabilities of clients self.clientCapabilities = ClientDefaultCapabilities @@ -189,6 +190,8 @@ ) return None, False, "" + self.__inShutdown = False + debugClientType = Preferences.getDebugger("DebugClientType3") if debugClientType == "standard": debugClient = os.path.join(getConfig('ericDir'), @@ -385,6 +388,8 @@ ) return None, self.__isNetworked, "" + self.__inShutdown = False + if project.getDebugProperty("REMOTEDEBUGGER"): ipaddr = self.debugServer.getHostAddress(False) rexec = project.getDebugProperty("REMOTECOMMAND") @@ -578,7 +583,8 @@ self.__master = None if debuggerId in self.__autoContinued: self.__autoContinued.remove(debuggerId) - self.debugServer.signalClientDisconnected(debuggerId) + if not self.__inShutdown: + self.debugServer.signalClientDisconnected(debuggerId) break else: if sock in self.__pendingConnections: @@ -626,6 +632,8 @@ if not self.__master: return + self.__inShutdown = True + while self.__connections: debuggerId, sock = self.__connections.popitem() self.__shutdownSocket(sock)