#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 {