Skip to content

Websocket: Message is not send when closing connection #1098

Description

@autoantwort

When I test the following code:

 CROW_WEBSOCKET_ROUTE(crowApp, "/test")
     .onopen([&](crow::websocket::connection &conn) {
             conn.send_text("Error with query params");
             conn.close("error", crow::websocket::PolicyViolated);
     })
     .onclose([&](crow::websocket::connection &conn, const std::string &reason, uint16_t code) {
         // This gets called twice?
     })

I never get the Error with query params message.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe viability / implementation of the issue is up for debate

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions