mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-03 22:08:28 +00:00 
			
		
		
		
	modbus: fix tcp slave destroy issues
Closes https://github.com/espressif/esp-idf/issues/8211
This commit is contained in:
		@@ -119,7 +119,7 @@ static esp_err_t mbc_tcp_slave_destroy(void)
 | 
			
		||||
    (void)vQueueDelete(mbs_opts->mbs_notification_queue_handle);
 | 
			
		||||
    (void)vEventGroupDelete(mbs_opts->mbs_event_group);
 | 
			
		||||
    (void)vMBTCPPortClose();
 | 
			
		||||
 | 
			
		||||
    mbs_interface_ptr = NULL;
 | 
			
		||||
    vMBPortSetMode((UCHAR)MB_PORT_INACTIVE);
 | 
			
		||||
    return ESP_OK;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -654,6 +654,7 @@ vMBTCPPortDisable( void )
 | 
			
		||||
            xConfig.pxMbClientInfo[i] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    free(xConfig.pxMbClientInfo);
 | 
			
		||||
    close(xListenSock);
 | 
			
		||||
    xListenSock = -1;
 | 
			
		||||
    vMBTCPPortRespQueueDelete(xConfig.xRespQueueHandle);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user