liyuezong 1 anno fa
parent
commit
2f8d3fd14e
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      pro/src/cascade_slave_tcp.c

+ 1 - 0
pro/src/cascade_slave_tcp.c

@@ -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;