18 Nov
2011
18 Nov
'11
1:31 p.m.
On Fri, 2011-11-18 at 12:23 +0100, Albert Brandl wrote:
But sometimes, the clients have to go offline. In this case, I'd like them to send a message to the server that they will be gone for a while. When a client goes offline, the twistd daemon for handling the heartbeats is shut down.
Presumably there is a method somewhere that decides to close the connection down: def timeToShutdown(self): self.transport.loseConnection() So instead do: def timeToShutdown(self): self.transport.write(GOODBYE) self.transport.loseConnection()