|
@@ -371,9 +371,12 @@ func shipStatusLoop() {
|
|
|
for {
|
|
for {
|
|
|
select {
|
|
select {
|
|
|
case <-ticker.C:
|
|
case <-ticker.C:
|
|
|
|
|
+ config := config.Conf()
|
|
|
|
|
+ piers := config.Piers
|
|
|
updates, err := constructPierInfo(piers)
|
|
updates, err := constructPierInfo(piers)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
- return res, err
|
|
|
|
|
|
|
+ errmsg := fmt.Sprintf("Unable to update ship state: %v", err) // insert appropriate error msg
|
|
|
|
|
+ logger.Error(errmsg)
|
|
|
}
|
|
}
|
|
|
// update broadcastState
|
|
// update broadcastState
|
|
|
err = UpdateBroadcastState(map[string]interface{}{
|
|
err = UpdateBroadcastState(map[string]interface{}{
|
|
@@ -382,8 +385,7 @@ func shipStatusLoop() {
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
errmsg := fmt.Sprintf("Unable to update ship state: %v", err)
|
|
errmsg := fmt.Sprintf("Unable to update ship state: %v", err)
|
|
|
logger.Error(errmsg)
|
|
logger.Error(errmsg)
|
|
|
- return res, err
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|