@@ -171,7 +171,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
171
171
m_client.close (m_con, static_cast <websocketpp::close::status::value>(status), utility::conversions::to_utf8string (reason), ec);
172
172
if (ec.value () != 0 )
173
173
{
174
- websocket_exception wx (ec.value ());
174
+ websocket_exception wx (ec.value (), ec. category () );
175
175
return pplx::task_from_exception<void >(wx);
176
176
}
177
177
}
@@ -274,7 +274,7 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
274
274
m_con = con;
275
275
if (ec.value () != 0 )
276
276
{
277
- websocket_exception wx (ec.value ());
277
+ websocket_exception wx (ec.value (), ec. category () );
278
278
return pplx::task_from_exception<void >(wx);
279
279
}
280
280
@@ -441,14 +441,10 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
441
441
auto ec = previousTask.get ();
442
442
if (ec.value () != 0 )
443
443
{
444
- websocket_exception wx (ec.value ());
444
+ websocket_exception wx (ec.value (), ec. category () );
445
445
eptr = std::make_exception_ptr (wx);
446
446
}
447
447
}
448
- catch (const websocket_exception& ex)
449
- {
450
- eptr = std::make_exception_ptr (ex);
451
- }
452
448
catch (...)
453
449
{
454
450
eptr = std::current_exception ();
@@ -522,7 +518,6 @@ class ws_desktop_client : public _websocket_client_impl, public std::enable_shar
522
518
// Queue to maintain the receive tasks when there are no messages(yet).
523
519
std::queue<pplx::task_completion_event<websocket_incoming_message>> m_receive_task_queue;
524
520
525
-
526
521
// Guards access to m_outgoing_msg_queue
527
522
std::mutex m_send_lock;
528
523
0 commit comments