]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/src/connection.cpp
Mas msg lindos
[z.facultad/75.42/plaqui.git] / Server / src / connection.cpp
index 75915c96918ff34ab05e7ccd18d1d23c95eb2949..cf0e293cdb4a92cd79a310b31e6be230db23e029 100644 (file)
@@ -74,19 +74,18 @@ Connection::Connection(const std::string& host, const Port& port):
 #endif // DEBUG
 }
 
 #endif // DEBUG
 }
 
-void Connection::finish(bool attach) {
+void Connection::finish(void) {
 #ifdef DEBUG
        cerr << __FILE__ << "(" << __LINE__ << ")"
 #ifdef DEBUG
        cerr << __FILE__ << "(" << __LINE__ << ")"
-               << ": finish(attach = " << attach << ")." << endl;
+               << ": finish();" << endl;
 #endif // DEBUG
 #endif // DEBUG
-       //socket_mutex.lock();
+       Runnable::finish();
        try {
        try {
+               // Para que el socket retorne el control, cierro sus canales de E/S.
                socket->shutdown(sockbuf::shut_readwrite);
        } catch (const sockerr& e) {
                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 {
 }
 
 const string& Connection::get_host(void) const {