327 # If we already have a connection, refuse this one. It will be closed |
327 # If we already have a connection, refuse this one. It will be closed |
328 # automatically. |
328 # automatically. |
329 if self.qsock is not None: |
329 if self.qsock is not None: |
330 return False |
330 return False |
331 |
331 |
332 self.connect(sock, SIGNAL('disconnected()'), self.debugServer.startClient) |
332 sock.disconnected[()].connect(self.debugServer.startClient) |
333 self.connect(sock, SIGNAL('readyRead()'), self.__parseClientLine) |
333 sock.readyRead[()].connect(self.__parseClientLine) |
334 |
334 |
335 self.qsock = sock |
335 self.qsock = sock |
336 |
336 |
337 # Get the remote clients capabilities |
337 # Get the remote clients capabilities |
338 self.remoteCapabilities() |
338 self.remoteCapabilities() |
359 return |
359 return |
360 |
360 |
361 # do not want any slots called during shutdown |
361 # do not want any slots called during shutdown |
362 self.disconnect(self.qsock, SIGNAL('disconnected()'), |
362 self.disconnect(self.qsock, SIGNAL('disconnected()'), |
363 self.debugServer.startClient) |
363 self.debugServer.startClient) |
364 self.disconnect(self.qsock, SIGNAL('readyRead()'), self.__parseClientLine) |
364 self.qsock.readyRead[()].disconnect(self.__parseClientLine) |
365 |
365 |
366 # close down socket, and shut down client as well. |
366 # close down socket, and shut down client as well. |
367 self.__sendCommand('{0}\n'.format(RequestShutdown)) |
367 self.__sendCommand('{0}\n'.format(RequestShutdown)) |
368 self.qsock.flush() |
368 self.qsock.flush() |
369 |
369 |