mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-16 20:52:57 +08:00
f82415f6b9
This addresses the issue where a server would otherwise reject a valid connection attempt from a rebooted node, due to the server thinking that packet belonged to a recently closed session. By starting off the local TCP port numbers at random* points each boot the risk of port reuse across a reboot is significantly reduced. *) As random as can be had via the lower 12 bits of the ccounter.