Skip to content

Commit 9260b72

Browse files
committed
Exit if we cannot connect to edge router after 10 attempts
1 parent 7648fe2 commit 9260b72

File tree

1 file changed

+4
-0
lines changed
  • src/main/java/international/dmc/secom_mms_gateway/mms

1 file changed

+4
-0
lines changed

src/main/java/international/dmc/secom_mms_gateway/mms/MMSAgent.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ public void afterConnectionClosed(WebSocketSession session, CloseStatus status)
232232
retryCount++;
233233
}
234234
}
235+
if (!shuttingDown.get()) {
236+
log.error("Failed to connect to edge router after {} attempts", retryCount);
237+
System.exit(1);
238+
}
235239
}
236240
session.close();
237241
}

0 commit comments

Comments
 (0)