X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f1f2d6a48b96c759d197d1227e157665d0d7bbcc..cd6078479123cd2cfe62df2d838633c143649edf:/Server/src/tcpserver.cpp diff --git a/Server/src/tcpserver.cpp b/Server/src/tcpserver.cpp index a7b3dc7..861b6ee 100644 --- a/Server/src/tcpserver.cpp +++ b/Server/src/tcpserver.cpp @@ -65,7 +65,6 @@ void PlaQui::Server::TCPServer::on_connection_finished( << connection << ")" << std::endl; #endif // DEBUG Glib::Mutex::Lock lock(connections_mutex); - // XXX connections_mutex.lock(); connections.remove(connection); #ifdef DEBUG std::cerr << __FILE__ << ": lista de conexiones" << std::endl; @@ -74,7 +73,6 @@ void PlaQui::Server::TCPServer::on_connection_finished( std::cerr << "\t " << *i << std::endl; } #endif // DEBUG - // XXX connections_mutex.unlock(); } /// \todo TODO: ver tema de timeout o como salir de un accept(). @@ -91,6 +89,7 @@ void PlaQui::Server::TCPServer::real_run(void) { << std::endl; #endif // DEBUG Glib::Mutex::Lock lock(connections_mutex); + // XXX connections_mutex.lock(); connections.push_back(connection); #ifdef DEBUG std::cerr << __FILE__ << ": real_run(): lista de conexiones" << std::endl; @@ -99,6 +98,7 @@ void PlaQui::Server::TCPServer::real_run(void) { std::cerr << "\t " << *i << std::endl; } #endif // DEBUG + // XXX connections_mutex.unlock(); // Si pongo el mutex antes del run(), muere. // Conecto la señal para cuando termina una conexión, borrarla. connection->signal_finished().connect( SigC::bind( @@ -106,7 +106,6 @@ void PlaQui::Server::TCPServer::real_run(void) { &TCPServer::on_connection_finished), connection)); connection->run(); - //connections_mutex.unlock(); // Si pongo el mutex antes del run(), muere. } }