diff --git a/include/crow/routing.h b/include/crow/routing.h index d3b69abbf..af7641ff8 100644 --- a/include/crow/routing.h +++ b/include/crow/routing.h @@ -376,7 +376,7 @@ namespace crow public: WebSocketRule(std::string rule, App* app): BaseRule(std::move(rule)), - app_(app) + app_(app), max_payload_(app_.websocket_max_payload()) {} diff --git a/include/crow/websocket.h b/include/crow/websocket.h index d7dca5279..4b1121af4 100644 --- a/include/crow/websocket.h +++ b/include/crow/websocket.h @@ -81,7 +81,7 @@ namespace crow message_handler_(std::move(message_handler)), close_handler_(std::move(close_handler)), error_handler_(std::move(error_handler)), - accept_handler_(std::move(accept_handler)) + accept_handler_(std::move(accept_handler)), max_payload_bytes_(handler.websocket_max_payload()) { if (!boost::iequals(req.get_header_value("upgrade"), "websocket"))