Skip to content

Websocket: Message is not send when closing connection #1098

@autoantwort

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionThe viability / implementation of the issue is up for debate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions