]> prime8.dev >> repos - ttyd.git/commitdiff
protocol: ignore invalid message
authorShuanglei Tao <tsl0922@gmail.com>
Sat, 24 Mar 2018 04:17:25 +0000 (12:17 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Sat, 24 Mar 2018 04:17:25 +0000 (12:17 +0800)
src/protocol.c

index d4db6ae433207937745d1c811e315d255a65a627..197465361ebee8a01f48212ff0b53da75ef60da3 100644 (file)
@@ -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) {