From d5706a11c546a5cb1a8cf5203cba3e3f2fe1aa06 Mon Sep 17 00:00:00 2001 From: Liu Dongmiao Date: Thu, 13 Jun 2024 04:26:23 +0800 Subject: [PATCH] server: don't close tunnel when eof (again) --- common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common.c b/common.c index e9eb56b..c03ddc9 100644 --- a/common.c +++ b/common.c @@ -695,6 +695,11 @@ void raw_event_cb(struct bufferevent *raw, short event, void *tev) { #endif if (event & (BEV_EVENT_EOF | BEV_EVENT_ERROR)) { LOGD("connection %u closed for wss %p, event: 0x%02x", port, tev, event); +#ifdef WSS_PROXY_SERVER + if (event & BEV_EVENT_EOF) { + return; + } +#endif do_close_wss(tev); } else if (event & BEV_EVENT_TIMEOUT) { LOGW("connection %u timeout for wss %p, event: 0x%02x", port, tev, event);