From: Andy Green Date: Wed, 28 Jun 2017 01:57:15 +0000 (+0800) Subject: test-server-http: no need to complete transaction early since FILE_COMPLETION will... X-Git-Tag: accepted/tizen/4.0/unified/20171012.191640~68 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibwebsockets.git;a=commitdiff_plain;h=47da96664f438e3914ec42784d58b650ea2914c4 test-server-http: no need to complete transaction early since FILE_COMPLETION will do it --- diff --git a/test-server/test-server-http.c b/test-server/test-server-http.c index 90daaf2..a990f6f 100644 --- a/test-server/test-server-http.c +++ b/test-server/test-server-http.c @@ -412,13 +412,14 @@ int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user, n = (char *)p - leaf_path; n = lws_serve_http_file(wsi, buf, mimetype, other_headers, n); - if (n < 0 || ((n > 0) && lws_http_transaction_completed(wsi))) - return -1; /* error or can't reuse connection: close the socket */ + if (n < 0) + return -1; /* error*/ /* * notice that the sending of the file completes asynchronously, * we'll get a LWS_CALLBACK_HTTP_FILE_COMPLETION callback when - * it's done + * it's done. That's the case even if we just completed the + * send, so wait for that. */ break;