Skip to content

Commit 775eb9b

Browse files
authored
fix: tcp_output() should always be called after tcp_write(), does not break nagle (+ doc) (#5172)
1 parent 7c91eee commit 775eb9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libraries/ESP8266WiFi/src/include/ClientContext.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,11 @@ class ClientContext
508508
}
509509
}
510510

511-
if (has_written && (_sync || tcp_nagle_disabled(_pcb)))
511+
if (has_written)
512512
{
513-
// handle no-Nagle manually because of TCP_WRITE_FLAG_MORE
514513
// lwIP's tcp_output doc: "Find out what we can send and send it"
514+
// *with respect to Nagle*
515+
// more insights: https://lists.gnu.org/archive/html/lwip-users/2017-11/msg00134.html
515516
tcp_output(_pcb);
516517
}
517518

0 commit comments

Comments
 (0)