protocol: ignore invalid message

This commit is contained in:
Shuanglei Tao
2018-03-24 12:17:25 +08:00
parent 7a991feb89
commit ff1f19d9ef

View File

@@ -336,9 +336,8 @@ callback_tty(struct lws *wsi, enum lws_callback_reasons reason,
} }
break; break;
default: default:
lwsl_warn("unknown message type: %c\n", command); lwsl_warn("ignored unknown message type: %c\n", command);
lws_close_reason(wsi, LWS_CLOSE_STATUS_INVALID_PAYLOAD, NULL, 0); break;
return -1;
} }
if (client->buffer != NULL) { if (client->buffer != NULL) {