I keep a list of client connections which are setup like this:
cons = {}
sid = 5
cons[sid] = self.reactor.connectTCP(host, port, myprotocol)
If the item is still connected, and I call del cons[5]
, the connection object still persists. I can see the output in my server console. The object is definitely gone from the dict though.
I can call .disconnect() on it, and then call del cons[5]
, and it does disconnect and remove the item, but I'm concerned that the connection still exists somewhere.
What would be the proper way to destroy one of these connections?