HeWang пре 5 месеци
родитељ
комит
856143264a
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      aarch64/pjibot_guide/control/pkg/judge_local.go

+ 3 - 3
aarch64/pjibot_guide/control/pkg/judge_local.go

@@ -21,7 +21,7 @@ func GetLocalStatus(localStatus *string, lastLocalStatus *string, turnLength int
 		_, msg, err := config.WsConn.ReadMessage()
 		if err != nil {
 			log.Println("Error in receive:", err)
-			break
+			continue
 		}
 		//log.Printf("Received: %s\n", msg)
 
@@ -29,8 +29,8 @@ func GetLocalStatus(localStatus *string, lastLocalStatus *string, turnLength int
 		var statusMessage config.StatusMessage
 		err = json.Unmarshal(msg, &statusMessage)
 		if err != nil {
-			log.Println("Error in receive:", err)
-			break
+			log.Println("Error in json:", err)
+			continue
 		}
 
 		if statusMessage.Type == "push" && statusMessage.Topic == "robotStatus" {