while (!stop) {
Command command;
try {
- Glib::Mutex::Lock lock(socket_mutex);
+ //Glib::Mutex::Lock lock(socket_mutex);
socket >> command;
// Si se cerró el socket.
} catch (const ios::failure& e) {
<< e.code << " | reason = " << HTTPMessage::reason(e.code)
<< " | desc = " << e.what() << endl;
#endif // DEBUG
+ //Glib::Mutex::Lock lock(socket_mutex);
socket << HTTPResponse(e) << flush;
continue;
}
}
void ControlServer::send(const HTTPResponse& response) {
- Glib::Mutex::Lock lock(socket_mutex);
+ //Glib::Mutex::Lock lock(socket_mutex);
socket << response << flush;
+#ifdef DEBUG
+ cerr << __FILE__ << ": send() Enviado!" << endl;
+#endif // DEBUG
}
ControlServer::SignalCommandReceived& ControlServer::signal_command_received(void) {