Httpd: Avoid console spam by WS ping/pong frames
This commit is contained in:
parent
0bea6153b0
commit
3c56e74d07
1 changed files with 6 additions and 1 deletions
|
@ -426,8 +426,13 @@ int WebsocketConnection::onConnect(struct mg_connection * connection)
|
||||||
int WebsocketConnection::request(struct mg_connection * connection)
|
int WebsocketConnection::request(struct mg_connection * connection)
|
||||||
{
|
{
|
||||||
setConnection(connection);
|
setConnection(connection);
|
||||||
|
if ((connection->wsbits & 0x0f) >= 0x8) {
|
||||||
|
// control opcode (close/ping/pong)
|
||||||
|
return MG_MORE;
|
||||||
|
}
|
||||||
|
|
||||||
MongooseHTTPRequest request(connection);
|
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) {
|
if ( NULL == _websocket) {
|
||||||
SG_LOG(SG_NETWORK, SG_ALERT, "httpd: unhandled websocket uri: " << request.Uri);
|
SG_LOG(SG_NETWORK, SG_ALERT, "httpd: unhandled websocket uri: " << request.Uri);
|
||||||
|
|
Loading…
Add table
Reference in a new issue