From ad37d323f86722f1c54d926692b30f3751bd8467 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Sun, 3 Feb 2013 22:44:32 -0500 Subject: [PATCH] fix rpc_stream_connection destructor --- src/json_rpc_stream_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json_rpc_stream_connection.cpp b/src/json_rpc_stream_connection.cpp index 4f4462b..d33e14a 100644 --- a/src/json_rpc_stream_connection.cpp +++ b/src/json_rpc_stream_connection.cpp @@ -23,7 +23,6 @@ namespace fc { namespace json { ~impl() { try { self.cancel_pending_requests(); - self.close(); _read_loop_complete.cancel(); _read_loop_complete.wait(); } catch ( ... ) {} @@ -64,6 +63,7 @@ namespace fc { namespace json { rpc_stream_connection::rpc_stream_connection(const rpc_stream_connection& c):my(c.my){ } rpc_stream_connection::~rpc_stream_connection(){ wlog( "%p", this ); + close(); } // the life of the streams must exceed the life of all copies