From: Shuanglei Tao Date: Fri, 14 Jun 2019 23:43:18 +0000 (+0800) Subject: http: fix keepalive issue X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=e3b569160d713c2c02076faa31de05d205d1bc50;p=ttyd.git http: fix keepalive issue --- diff --git a/src/http.c b/src/http.c index 1704e91..cda1c8d 100644 --- a/src/http.c +++ b/src/http.c @@ -100,15 +100,14 @@ callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user, voi #if LWS_LIBRARY_VERSION_MAJOR < 3 if (n > 0 && lws_write_http(wsi, buf, n) < 0) return 1; - goto try_to_reuse; #else if (n > 0) { pss->buffer = pss->ptr = strdup(buf); pss->len = n; lws_callback_on_writable(wsi); } - return 0; #endif + goto try_to_reuse; } if (strcmp(pss->path, "/") != 0) {