diff --git a/net/pooled_socket.cpp b/net/pooled_socket.cpp index 1d3f3980..541c44d9 100644 --- a/net/pooled_socket.cpp +++ b/net/pooled_socket.cpp @@ -230,9 +230,11 @@ class TCPSocketPool : public ForwardSocketClient { bool release(const EndPoint& ep, ISocketStream* stream) { auto fd = stream->get_underlay_fd(); + ERRNO err; if (!stream_alive(fd)) return false; auto node = new StreamListNode(ep, stream, fd, TTL_us); push_into_pool(node); + errno = err.no; return true; }