Fix websocket_client crash on close
This commit is contained in:
parent
397830b8ef
commit
8aa729da68
1 changed files with 3 additions and 2 deletions
|
|
@ -471,12 +471,13 @@ namespace fc { namespace http {
|
|||
}
|
||||
~websocket_client_impl()
|
||||
{
|
||||
if(_connection )
|
||||
if( _connection )
|
||||
{
|
||||
_connection->close(0, "client closed");
|
||||
_connection.reset();
|
||||
_closed->wait();
|
||||
}
|
||||
if( _closed )
|
||||
_closed->wait();
|
||||
}
|
||||
fc::promise<void>::ptr _connected;
|
||||
fc::promise<void>::ptr _closed;
|
||||
|
|
|
|||
Loading…
Reference in a new issue