Skip to content

Commit d4915e8

Browse files
committed
fix
1 parent 7a83cf7 commit d4915e8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/SignalR/clients/cpp/src/signalrclient/hub_connection_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ namespace signalr
109109
m_handshakeTask = pplx::task_completion_event<void>();
110110
m_handshakeReceived = false;
111111
std::weak_ptr<hub_connection_impl> weak_connection = shared_from_this();
112-
return m_connection->start([weak_connection, callback](std::exception_ptr start_exception)
112+
m_connection->start([weak_connection, callback](std::exception_ptr start_exception)
113113
{
114114
auto connection = weak_connection.lock();
115115
if (!connection)

src/SignalR/clients/cpp/src/signalrclient/websocket_transport.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,10 @@ namespace signalr
148148
_ASSERTE(uri.scheme() == _XPLATSTR("ws") || uri.scheme() == _XPLATSTR("wss"));
149149

150150
{
151-
std::unique_lock<std::mutex> stop_lock(m_start_stop_lock);
151+
std::lock_guard<std::mutex> stop_lock(m_start_stop_lock);
152152

153153
if (!m_receive_loop_cts.get_token().is_canceled())
154154
{
155-
// just in case the user tries to start again in the callback on error
156-
stop_lock.unlock();
157155
callback(std::make_exception_ptr(signalr_exception("transport already connected")));
158156
return;
159157
}

0 commit comments

Comments
 (0)