handle same vh protocol reinsert

This commit is contained in:
Andy Green 2017-08-12 20:53:49 +08:00
parent eed760164a
commit 1ead9b4c3c

View file

@ -449,8 +449,8 @@ lws_same_vh_protocol_insert(struct lws *wsi, int n)
// wsi->same_vh_protocol_prev);
if (wsi->same_vh_protocol_prev || wsi->same_vh_protocol_next) {
lwsl_err("Attempted to attach wsi twice to same vh prot\n");
assert(0);
lws_same_vh_protocol_remove(wsi);
lwsl_notice("Attempted to attach wsi twice to same vh prot\n");
}
wsi->same_vh_protocol_prev = /* guy who points to us */