-void Connection::finish(bool attach) {
- //socket_mutex.lock();
- socket->shutdown(sockbuf::shut_readwrite);
- //socket_mutex.unlock();
- Runnable::finish(attach);
+void Connection::finish(void) {
+#ifdef DEBUG
+ cerr << __FILE__ << "(" << __LINE__ << ")"
+ << ": finish();" << endl;
+#endif // DEBUG
+ 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) {
+ signal_error().emit(e.serrno(), e.errstr());
+ }