From fecd8ff508b33715cbe24ca892fc19a2d1ad1ef5 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 06 十一月 2023 16:34:05 +0800
Subject: [PATCH] 加锁解决同时读串口时报的资源不可用和超时报错

---
 api/v1/device.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/api/v1/device.go b/api/v1/device.go
index 4576cc7..c107808 100644
--- a/api/v1/device.go
+++ b/api/v1/device.go
@@ -45,7 +45,7 @@
 		return
 	}
 	service.SetDeviceIDToFile(params.CurrentDeviceID)
-	conf.Conf.SerfClusterStatus = params.CurrentDeviceID
+	conf.Conf.CurrentDeviceID = params.CurrentDeviceID
 	err = crontask.RestartTask(conf.Conf.SerfClusterStatus != constvar.SerfClusterStatusSlave)
 	if err != nil {
 		logx.Errorf("restart task failed:%v", err)

--
Gitblit v1.8.0