json_rpc_stream_connection destructor now calls close()

This commit is contained in:
Daniel Larimer 2013-02-03 22:31:07 -05:00
parent dff6b72ace
commit 8067060d29

View file

@ -22,12 +22,10 @@ namespace fc { namespace json {
~impl() {
try {
// slog( "..." );
self.cancel_pending_requests();
self.close();
_read_loop_complete.cancel();
// slog( "wait..." );
_read_loop_complete.wait();
// slog( "DONE ..." );
} catch ( ... ) {}
}
@ -66,7 +64,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 );
}
}
// the life of the streams must exceed the life of all copies
// of this rpc_stream_connection