You are using a Windows operating system and this error is related to a registry key value TcpTimedWaitDelay.
Reducing the TcpTimedWaitDelay time in Windows can solve such problems. By default, it is 240 (this is also the value if it is not set)
This setting needs to be set in the following location of the registry
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersTcpTimedWaitDelay
If there is no TcpTimedWaitDelay item in the registry, please add this item and set it to a double-byte (DWORD) type value. Set the value to between 30 ~ 60.