From ff1f19d9ef2b3e1af6983a98ec36b3b9c1b677e2 Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Sat, 24 Mar 2018 12:17:25 +0800 Subject: [PATCH] protocol: ignore invalid message --- src/protocol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { -- 2.43.4