382 # If we already have a connection, refuse this one. It will be closed |
382 # If we already have a connection, refuse this one. It will be closed |
383 # automatically. |
383 # automatically. |
384 if self.qsock is not None: |
384 if self.qsock is not None: |
385 return False |
385 return False |
386 |
386 |
387 sock.disconnected[()].connect(self.debugServer.startClient) |
387 sock.disconnected.connect(self.debugServer.startClient) |
388 sock.readyRead[()].connect(self.__parseClientLine) |
388 sock.readyRead.connect(self.__parseClientLine) |
389 |
389 |
390 self.qsock = sock |
390 self.qsock = sock |
391 |
391 |
392 # Get the remote clients capabilities |
392 # Get the remote clients capabilities |
393 self.remoteCapabilities() |
393 self.remoteCapabilities() |
413 if self.qsock is None: |
413 if self.qsock is None: |
414 return |
414 return |
415 |
415 |
416 # do not want any slots called during shutdown |
416 # do not want any slots called during shutdown |
417 self.qsock.disconnected.disconnect(self.debugServer.startClient) |
417 self.qsock.disconnected.disconnect(self.debugServer.startClient) |
418 self.qsock.readyRead[()].disconnect(self.__parseClientLine) |
418 self.qsock.readyRead.disconnect(self.__parseClientLine) |
419 |
419 |
420 # close down socket, and shut down client as well. |
420 # close down socket, and shut down client as well. |
421 self.__sendCommand('{0}\n'.format(DebugProtocol.RequestShutdown)) |
421 self.__sendCommand('{0}\n'.format(DebugProtocol.RequestShutdown)) |
422 self.qsock.flush() |
422 self.qsock.flush() |
423 |
423 |