From: Shuanglei Tao Date: Sat, 24 Mar 2018 04:17:25 +0000 (+0800) Subject: protocol: ignore invalid message X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=ff1f19d9ef2b3e1af6983a98ec36b3b9c1b677e2;p=ttyd.git protocol: ignore invalid message --- diff --git a/src/protocol.c b/src/protocol.c index d4db6ae..1974653 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -336,9 +336,8 @@ callback_tty(struct lws *wsi, enum lws_callback_reasons reason, } break; default: - lwsl_warn("unknown message type: %c\n", command); - lws_close_reason(wsi, LWS_CLOSE_STATUS_INVALID_PAYLOAD, NULL, 0); - return -1; + lwsl_warn("ignored unknown message type: %c\n", command); + break; } if (client->buffer != NULL) {