Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workarounds for two GCC 4.7.2 bugs with lambda functions #1209

Merged
merged 2 commits into from
Aug 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Release/src/websockets/client/ws_client_wspp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class wspp_callback_client : public websocket_client_callback_impl,

client.set_fail_handler([this](websocketpp::connection_hdl con_hdl) {
_ASSERTE(m_state == CONNECTING);
shutdown_wspp_impl<WebsocketConfigType>(con_hdl, true);
this->shutdown_wspp_impl<WebsocketConfigType>(con_hdl, true);
});

client.set_message_handler(
Expand Down Expand Up @@ -354,7 +354,7 @@ class wspp_callback_client : public websocket_client_callback_impl,

client.set_close_handler([this](websocketpp::connection_hdl con_hdl) {
_ASSERTE(m_state != CLOSED);
shutdown_wspp_impl<WebsocketConfigType>(con_hdl, false);
this->shutdown_wspp_impl<WebsocketConfigType>(con_hdl, false);
});

// Set User Agent specified by the user. This needs to happen before any connection is created
Expand Down Expand Up @@ -679,7 +679,7 @@ class wspp_callback_client : public websocket_client_callback_impl,
client.stop_perpetual();

// Can't join thread directly since it is the current thread.
pplx::create_task([this, connecting, ec, closeCode, reason] {
pplx::create_task([] {}).then([this, connecting, ec, closeCode, reason]() mutable {
{
std::lock_guard<std::mutex> lock(m_wspp_client_lock);
if (m_thread.joinable())
Expand Down