You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/signalrclient/hub_connection_impl.cpp
+53-7Lines changed: 53 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,11 @@ namespace signalr
61
61
auto connection = weak_hub_connection.lock();
62
62
if (connection)
63
63
{
64
+
// start may be waiting on the handshake response so we complete it here, this no-ops if already set
64
65
connection->m_handshakeTask->set(std::make_exception_ptr(signalr_exception("connection closed while handshake was in progress.")));
66
+
67
+
connection->m_callback_manager.clear(signalr::value(std::map<std::string, signalr::value> { { std::string("error"), std::string("connection was stopped before invocation result was received") } }));
68
+
65
69
connection->m_disconnected();
66
70
}
67
71
});
@@ -125,7 +129,6 @@ namespace signalr
125
129
callback(std::make_exception_ptr(signalr_exception("the hub connection has been deconstructed")));
m_callback_manager.clear(signalr::value(std::map<std::string, signalr::value> { { std::string("error"), std::string("connection was stopped before invocation result was received") } }));
175
-
m_connection->stop(callback);
177
+
if (get_connection_state() == connection_state::disconnected)
178
+
{
179
+
m_logger.log(trace_level::info, "Stop ignored because the connection is already disconnected.");
0 commit comments