espressif / esp-modbus

ESP-Modbus - the officially suppported library for Modbus protocol (serial RS485 + TCP over WiFi or Ethernet).
Apache License 2.0
107 stars 49 forks source link

fix for closing tcp connections and watchdog timeout (IDFGH-11690) #44

Closed fromeijn closed 9 months ago

fromeijn commented 9 months ago

vTaskDelete was called to early in xMBTCPPortMasterShutdown causing open sockets not to be closed

added vTaskDelay in section when connection with slaves to prevent watchdog (idle task) to kick in

CLAassistant commented 9 months ago

CLA assistant check
All committers have signed the CLA.

alisitsyn commented 9 months ago

@fromeijn ,

Thank you for contribution. The update looks good. Just a minor thing to set task handle to NULL after deletion of the task here. xMbPortConfig.xMbTcpTaskHandle = NULL;

alisitsyn commented 9 months ago

Merged with commit 135a8f8165a701bda027f87a1e336723e397cbb2