From 2c5c30848a2d1cdd774ecaef2b051565f6f151f9 Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 19 Jul 2019 15:55:35 -0400 Subject: [PATCH] Correctly close websocket API connection --- src/rpc/websocket_api.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpc/websocket_api.cpp b/src/rpc/websocket_api.cpp index 0798f8f..da97a9e 100644 --- a/src/rpc/websocket_api.cpp +++ b/src/rpc/websocket_api.cpp @@ -74,7 +74,10 @@ websocket_api_connection::websocket_api_connection( const std::shared_ptrclosed.connect( [this](){ closed(); } ); + _connection->closed.connect( [this](){ + closed(); + _connection = nullptr; + } ); } variant websocket_api_connection::send_call(