Is that a similar issue to this here?
FreeRTOS+TCP socket: Long delay before successful reconnect - Libraries - FreeRTOS Community Forums