json_rpc_stream_connection destructor now calls close()
This commit is contained in:
parent
dff6b72ace
commit
8067060d29
1 changed files with 2 additions and 4 deletions
|
|
@ -22,12 +22,10 @@ namespace fc { namespace json {
|
||||||
|
|
||||||
~impl() {
|
~impl() {
|
||||||
try {
|
try {
|
||||||
// slog( "..." );
|
|
||||||
self.cancel_pending_requests();
|
self.cancel_pending_requests();
|
||||||
|
self.close();
|
||||||
_read_loop_complete.cancel();
|
_read_loop_complete.cancel();
|
||||||
// slog( "wait..." );
|
|
||||||
_read_loop_complete.wait();
|
_read_loop_complete.wait();
|
||||||
// slog( "DONE ..." );
|
|
||||||
} catch ( ... ) {}
|
} 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(const rpc_stream_connection& c):my(c.my){ }
|
||||||
rpc_stream_connection::~rpc_stream_connection(){
|
rpc_stream_connection::~rpc_stream_connection(){
|
||||||
wlog( "%p", this );
|
wlog( "%p", this );
|
||||||
}
|
}
|
||||||
|
|
||||||
// the life of the streams must exceed the life of all copies
|
// the life of the streams must exceed the life of all copies
|
||||||
// of this rpc_stream_connection
|
// of this rpc_stream_connection
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue