TallerGrupo4/TPWorms

Usaría try_push y me parece lo mejor eliminar al jugador si falla.

Closed this issue · 0 comments

try {
player_queue->push(snapshot);
} catch (const ClosedQueue& err) {
/*
* It is an expected error, this should occur
* when stopping the whole server or when a
* client has disconnected, I think...
* If the client has disconnected, we should
* remove it from the match, unless we do that
* in other place, but I believe that here could
* be a good place to do it.
*/
// players_queues.erase(std::remove(players_queues.begin(), players_queues.end(), player_queue), players_queues.end());
continue;