@@ -138,6 +138,7 @@ static void *pthread_handle_tcp(void *arg)
}
modbus_close(mb->ctx);
modbus_free(mb->ctx);
+ close(fd);
mb->ctx = 0;
free(mb);
mb = NULL;