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()



_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to