1
0
Fork 0

Httpd: Avoid console spam by WS ping/pong frames

This commit is contained in:
James Turner 2019-06-05 17:40:49 +01:00
parent 0bea6153b0
commit 3c56e74d07

View file

@ -426,8 +426,13 @@ int WebsocketConnection::onConnect(struct mg_connection * connection)
int WebsocketConnection::request(struct mg_connection * connection)
{
setConnection(connection);
if ((connection->wsbits & 0x0f) >= 0x8) {
// control opcode (close/ping/pong)
return MG_MORE;
}
MongooseHTTPRequest request(connection);
SG_LOG(SG_NETWORK, SG_INFO, "WebsocketConnection::request for " << request.Uri);
SG_LOG(SG_NETWORK, SG_DEBUG, "WebsocketConnection::request for " << request.Uri);
if ( NULL == _websocket) {
SG_LOG(SG_NETWORK, SG_ALERT, "httpd: unhandled websocket uri: " << request.Uri);