Skip to content

Commit

Permalink
Merge pull request #450 from MichaelSB/ws_erase_connection
Browse files Browse the repository at this point in the history
erase websocket::connection from vector in App::remove_websocket()
  • Loading branch information
The-EDev authored Jun 3, 2022
2 parents 64d2541 + 5ef370c commit 017c6e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/crow/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ namespace crow

void remove_websocket(crow::websocket::connection* conn)
{
std::remove(websockets_.begin(), websockets_.end(), conn);
websockets_.erase(std::remove(websockets_.begin(), websockets_.end(), conn), websockets_.end());
}

/// Print the routing paths defined for each HTTP method
Expand Down

0 comments on commit 017c6e3

Please sign in to comment.