File tree Expand file tree Collapse file tree
info-collector/src/main/java/tools/simrail/backend/collector/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ public void collectServerInformation() throws Exception {
9999 // collect further information about the server, such as the timezone
100100 // on every second collection run (every 60 seconds)
101101 var errorDuringCollect = false ;
102+ var oldServerCount = this .collectedServers .size ();
102103 var fullCollection = this .collectionRuns ++ % 2 == 0 ;
103- var collectionRequired = this .collectedServers .isEmpty ();
104104
105105 var response = this .panelApiClient .getServers ();
106106 var servers = response .getEntries ();
@@ -231,7 +231,8 @@ public void collectServerInformation() throws Exception {
231231 }
232232 }
233233
234- if (fullCollection && (collectionRequired || !errorDuringCollect )) {
234+ var collectedServerCount = foundServers .size ();
235+ if (fullCollection && (collectedServerCount > oldServerCount || !errorDuringCollect )) {
235236 // update the found servers during the run to make them available to readers
236237 // only do this if no error was encountered during collection or collection
237238 // being necessary due to no servers being found previously
You can’t perform that action at this time.
0 commit comments