From 7f0277d6934af2bbaa648d59e4c9be80392af44f Mon Sep 17 00:00:00 2001 From: david gauchard Date: Wed, 26 Sep 2018 23:27:15 +0200 Subject: [PATCH] fix: tcp_output() should always be called after tcp_write(), does not break nagle (+ doc) --- libraries/ESP8266WiFi/src/include/ClientContext.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/ESP8266WiFi/src/include/ClientContext.h b/libraries/ESP8266WiFi/src/include/ClientContext.h index e0841d1c52..adff0722e6 100644 --- a/libraries/ESP8266WiFi/src/include/ClientContext.h +++ b/libraries/ESP8266WiFi/src/include/ClientContext.h @@ -508,10 +508,11 @@ class ClientContext } } - if (has_written && (_sync || tcp_nagle_disabled(_pcb))) + if (has_written) { - // handle no-Nagle manually because of TCP_WRITE_FLAG_MORE // lwIP's tcp_output doc: "Find out what we can send and send it" + // *with respect to Nagle* + // more insights: https://lists.gnu.org/archive/html/lwip-users/2017-11/msg00134.html tcp_output(_pcb); }