fix memory leak in net::socket_stream