Connection::Connection(const sockbuf::type& type, const std::string& host,
const Port& port): socket(type), host(host), port(port) {
#ifdef DEBUG
Connection::Connection(const sockbuf::type& type, const std::string& host,
const Port& port): socket(type), host(host), port(port) {
#ifdef DEBUG
- socket->shutdown(sockbuf::shut_readwrite);
+ try {
+ socket->shutdown(sockbuf::shut_readwrite);
+ } catch (const sockerr& e) {
+ error(e.serrno(), e.errstr());
+ }