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?