I'm trying to pass a TCP connection to a Twisted subprocess with adoptStreamConnection, but I can't figure out how to get the Process disposed in the main process after doing that.

My desired flow looks like this:

- Finish writing any data the Protocol transport has waiting
- When we know the write buffer is empty send the AMP message to transfer the socket to the subprocess
- Dispose the Protocol instance in the main process
- I tried doing nothing, loseConnection, abortConnection, and monkey patching _socketClose out and using loseConnection. See code here: http://pastebin.com/nK0Huxuj

In all cases the Protocol object still exists in the main process after the socket has been transferred, even if the main process isn't listening to that socket anymore. How can I clean this up?

Thanks in advance.
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to