X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/7e74b790d290cd7d776349503bb361c47933c01f..c82138b139ddc29ded10368db1327a565b688aeb:/Server/src/connection.cpp diff --git a/Server/src/connection.cpp b/Server/src/connection.cpp index 75915c9..cf0e293 100644 --- a/Server/src/connection.cpp +++ b/Server/src/connection.cpp @@ -74,19 +74,18 @@ Connection::Connection(const std::string& host, const Port& port): #endif // DEBUG } -void Connection::finish(bool attach) { +void Connection::finish(void) { #ifdef DEBUG cerr << __FILE__ << "(" << __LINE__ << ")" - << ": finish(attach = " << attach << ")." << endl; + << ": finish();" << endl; #endif // DEBUG - //socket_mutex.lock(); + Runnable::finish(); try { + // Para que el socket retorne el control, cierro sus canales de E/S. socket->shutdown(sockbuf::shut_readwrite); } catch (const sockerr& e) { - error(e.serrno(), e.errstr()); + signal_error().emit(e.serrno(), e.errstr()); } - //socket_mutex.unlock(); - Runnable::finish(attach); } const string& Connection::get_host(void) const {