Skip to content

Commit

Permalink
http: fix keepalive issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Jun 14, 2019
1 parent dbb72de commit e3b5691
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e3b5691

Please sign in to comment.