diff options
author | Angus Gratton <angus@redyak.com.au> | 2024-10-02 14:49:49 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-10-10 17:55:03 +1100 |
commit | 82e69df33e379bf491bea647e217d6d56c5b8090 (patch) | |
tree | 50c01220eb57eb552719b272ca79cf41c738a4b4 /docs/esp32/tutorial/intro.rst | |
parent | 05ac69329d259b3853c2d3a89d669eba7f6eef46 (diff) |
esp32: Apply the LWIP active TCP socket limit.
This is a workaround for a bug in ESP-IDF where the configuration setting
for maximum active TCP sockets (PCBs) is not applied.
Fixes cases where a lot of short-lived TCP connections can cause:
- Excessive memory usage (unbounded number of sockets in TIME-WAIT).
- Much higher risk of stalled connections due to repeated port numbers. The
maximum number of active TCP PCBs is reduced from 16 to 12 to further
reduce this risk (trade-off against possibility of TIME-WAIT
Assassination as described in RFC1337).
This is not a watertight fix for the second point: a peer can still reuse a
port number while a previous socket is in TIME-WAIT, and LWIP will reject
that connection (in an RFC compliant way) causing the peer to stall.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'docs/esp32/tutorial/intro.rst')
0 files changed, 0 insertions, 0 deletions