@@ -12,6 +12,7 @@ import (
// running 繁忙状态,此状态机器人不接受新任务
// error 错误状态(硬件,不能正常工作的)
func GetLocalStatus(localStatus *string, lastLocalStatus *string, turnLength int) {
+ defer config.WsConn.Close()
// 轮询本地任务状态
for {
time.Sleep(time.Duration(turnLength) * time.Second)