mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
#692 Remove closing of the WebSocket if no subprotocol is matching
This commit is contained in:
parent
06d68ce877
commit
ebd1708251
@ -101,14 +101,7 @@ namespace crow
|
||||
{
|
||||
auto requested_subprotocols = utility::split(requested_subprotocols_header, ", ");
|
||||
auto subprotocol = utility::find_first_of(subprotocols.begin(), subprotocols.end(), requested_subprotocols.begin(), requested_subprotocols.end());
|
||||
if (subprotocol == subprotocols.end())
|
||||
{
|
||||
adaptor_.close();
|
||||
handler_->remove_websocket(this);
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (subprotocol != subprotocols.end())
|
||||
{
|
||||
subprotocol_ = *subprotocol;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user