Dropping a connection problem.

Hi, I am creating a server-client game and got into a pretty strange problem.

Right now I have one task that accepts connections, it has its own QueuedConnectionManager and a QueuedConnectionListener.
After it accepts the connection with getNewConnection(), it saves it on a list, until the number of connections to start a new game is reached, then I send a copy of the list (using the [:] list method) to another class, that creates a new Task to handle a game.

The object that handles the game has its own QueuedConnectionManager, QueuedConnectionReader and ConnectionWriter, which it uses to receave and send data.
As the game goes, if one player drops the connection the first thing I noticed is that the processing increases to 100% of a core.
So I tried to drop the connection, the first thing I tried was to call the closeConnection method, from the manager that is receiving and sending for that connection, it always returns false (and the high processing continues).

Then I tried this:

droppedConnection = PointerToConnection()
if (self.cManager.getResetConnection(droppedConnection) == True):
    droppedConnection.getManager().closeConnection(droppedConnection)

The closeConnection method returns true, but only for the first player that disconnects. When another player disconnects, the server fails to notice it.
My question is, do I need to something so that the resetConnectionAvailable() method start working again?

The clip you posted looks correct to me. I don’t know what’s going wrong, but it sounds like you’ve got the right handle on the Panda interface.

David

I am doing some extra investigation and found that the QueuedConnectionManager that the connection references when I use the getManager method is the one that is used to accept it.
This is pretty odd IMO (I would expect to be the one receiving from it).
Anyways, I am using the same now and still not working, will check if I can find what is wrong.

EDIT: On a side note, the CPU usage went back to normal, so this “solves” my problem, still find it odd, tough, as the Python Reference says, it won’t drop if there is any reference to the connection, I believe I removed then all, but probably forgot one.