347 # If we already have a connection, refuse this one. It will be closed |
347 # If we already have a connection, refuse this one. It will be closed |
348 # automatically. |
348 # automatically. |
349 if self.qsock is not None: |
349 if self.qsock is not None: |
350 return False |
350 return False |
351 |
351 |
352 sock.disconnected[()].connect(self.debugServer.startClient) |
352 sock.disconnected.connect(self.debugServer.startClient) |
353 sock.readyRead[()].connect(self.__parseClientLine) |
353 sock.readyRead.connect(self.__parseClientLine) |
354 |
354 |
355 self.qsock = sock |
355 self.qsock = sock |
356 |
356 |
357 # Get the remote clients capabilities |
357 # Get the remote clients capabilities |
358 self.remoteCapabilities() |
358 self.remoteCapabilities() |
378 if self.qsock is None: |
378 if self.qsock is None: |
379 return |
379 return |
380 |
380 |
381 # do not want any slots called during shutdown |
381 # do not want any slots called during shutdown |
382 self.qsock.disconnected.disconnect(self.debugServer.startClient) |
382 self.qsock.disconnected.disconnect(self.debugServer.startClient) |
383 self.qsock.readyRead[()].disconnect(self.__parseClientLine) |
383 self.qsock.readyRead.disconnect(self.__parseClientLine) |
384 |
384 |
385 # close down socket, and shut down client as well. |
385 # close down socket, and shut down client as well. |
386 self.__sendCommand('{0}\n'.format(DebugProtocol.RequestShutdown)) |
386 self.__sendCommand('{0}\n'.format(DebugProtocol.RequestShutdown)) |
387 self.qsock.flush() |
387 self.qsock.flush() |
388 |
388 |