Loading sls/trunk/src/sll/connection.cc +3 −2 Original line number Diff line number Diff line Loading @@ -144,11 +144,12 @@ void Connection::connect(const char *addr, int port) { // connect if (::connect(socket_fd_, (struct sockaddr *) &daddr, sizeof daddr) == -1) { int errno__ = errno; disconnect_(); pthread_mutex_unlock(&w_mutex_); pthread_mutex_unlock(&r_mutex_); pthread_mutex_unlock(&c_mutex_); throw Error(ERR_NET, (string) "Unable to connect to " + addr + ": " + hstrerror(h_errno)); throw Error(ERR_NET, (string) "Unable to connect to " + addr + ": " + strerror(errno__)); } // set infos Loading Loading @@ -308,7 +309,7 @@ void Connection::send(const char* buf, size_t len) { pthread_mutex_unlock(&r_mutex_); pthread_mutex_unlock(&c_mutex_); pthread_mutex_unlock(&r_mutex_); if (errno__ == ECONNRESET)// || errno__ == EPIPE) if (errno__ == ECONNRESET || errno__ == EPIPE) throw Error(ERR_NET, "Connection reset by peer"); else throw Error(ERR_NET, "send: " + (string) strerror(errno__)); Loading Loading
sls/trunk/src/sll/connection.cc +3 −2 Original line number Diff line number Diff line Loading @@ -144,11 +144,12 @@ void Connection::connect(const char *addr, int port) { // connect if (::connect(socket_fd_, (struct sockaddr *) &daddr, sizeof daddr) == -1) { int errno__ = errno; disconnect_(); pthread_mutex_unlock(&w_mutex_); pthread_mutex_unlock(&r_mutex_); pthread_mutex_unlock(&c_mutex_); throw Error(ERR_NET, (string) "Unable to connect to " + addr + ": " + hstrerror(h_errno)); throw Error(ERR_NET, (string) "Unable to connect to " + addr + ": " + strerror(errno__)); } // set infos Loading Loading @@ -308,7 +309,7 @@ void Connection::send(const char* buf, size_t len) { pthread_mutex_unlock(&r_mutex_); pthread_mutex_unlock(&c_mutex_); pthread_mutex_unlock(&r_mutex_); if (errno__ == ECONNRESET)// || errno__ == EPIPE) if (errno__ == ECONNRESET || errno__ == EPIPE) throw Error(ERR_NET, "Connection reset by peer"); else throw Error(ERR_NET, "send: " + (string) strerror(errno__)); Loading