"" is the default value for the WebSocket::shutdown() statusMessage parameter

So no need to pass it.
This commit is contained in:
Tor Lillqvist 2016-10-12 12:51:06 +03:00
parent 55e6a76639
commit 4b5561c9b4

View file

@ -203,7 +203,7 @@ void shutdownLimitReached(WebSocket& ws)
if (--retries == 4)
{
ws.sendFrame(error.data(), error.size());
ws.shutdown(WebSocket::WS_POLICY_VIOLATION, "");
ws.shutdown(WebSocket::WS_POLICY_VIOLATION);
}
}
while (retries > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
@ -211,7 +211,7 @@ void shutdownLimitReached(WebSocket& ws)
catch (Exception&)
{
ws.sendFrame(error.data(), error.size());
ws.shutdown(WebSocket::WS_POLICY_VIOLATION, "");
ws.shutdown(WebSocket::WS_POLICY_VIOLATION);
}
}
@ -896,7 +896,7 @@ private:
// something wrong, with internal exceptions
Log::trace("Abnormal close handshake.");
session->closeFrame();
ws->shutdown(WebSocket::WS_ENDPOINT_GOING_AWAY, "");
ws->shutdown(WebSocket::WS_ENDPOINT_GOING_AWAY);
session->shutdownPeer(WebSocket::WS_ENDPOINT_GOING_AWAY, "");
}
}
@ -1049,7 +1049,7 @@ public:
const std::string msg = std::string("error: ") + exc.what();
ws->sendFrame(msg.data(), msg.size());
// abnormal close frame handshake
ws->shutdown(WebSocket::WS_ENDPOINT_GOING_AWAY, "");
ws->shutdown(WebSocket::WS_ENDPOINT_GOING_AWAY);
}
catch (const std::exception& exc2)
{
@ -1274,7 +1274,7 @@ public:
// something wrong, with internal exceptions
Log::trace("Abnormal close handshake.");
session->closeFrame();
ws->shutdown(WebSocket::WS_ENDPOINT_GOING_AWAY, "");
ws->shutdown(WebSocket::WS_ENDPOINT_GOING_AWAY);
session->shutdownPeer(WebSocket::WS_ENDPOINT_GOING_AWAY, "");
}
}