Skip to content

Commit

Permalink
esp32/sdkconfig: Shorten LWIP MSL period to 10 seconds.
Browse files Browse the repository at this point in the history
Default MSL is 60 seconds.

The main purpose of this is to shorten time closed sockets spend in the
TIME_WAIT state. This is (2 * MSL) so previously 2 minutes, with this
change becomes 20 seconds.

Without this, a system which makes many short-lived TCP connections can
grow to be holding hundreds of sockets in TIME_WAIT.

Possible fix for micropython#12819

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
  • Loading branch information
projectgus committed Nov 27, 2023
1 parent 094b52b commit e2ad198
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ports/esp32/boards/sdkconfig.base
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=2
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y
CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y

# UDP
# LWIP
CONFIG_LWIP_PPP_SUPPORT=y
CONFIG_LWIP_PPP_PAP_SUPPORT=y
CONFIG_LWIP_PPP_CHAP_SUPPORT=y
CONFIG_LWIP_TCP_MSL=10000

# SSL
# Use 4kiB output buffer instead of default 16kiB
Expand Down

0 comments on commit e2ad198

Please sign in to comment.