Skip to content

Commit 0f86f6a

Browse files
committed
2 parents 46ff061 + dd08c29 commit 0f86f6a

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ fabric.properties
4444
server/packages/**
4545
*.exe
4646
web/stations/16.11..txt
47+
sync.cmd

server/ETS2 Local Radio desktop/SimpleServer.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,11 @@ private void Process(HttpListenerContext context)
282282

283283
while (true)
284284
{
285-
if (previousId != Main.commandsData.id)
286-
{
287-
previousId = Main.commandsData.id;
288-
string text = "event: commands\ndata: " + Newtonsoft.Json.JsonConvert.SerializeObject(Main.commandsData) + "\n\n";
285+
previousId = Main.commandsData.id;
286+
string text = "event: commands\ndata: " + Newtonsoft.Json.JsonConvert.SerializeObject(Main.commandsData) + "\n\n";
289287

290-
context.Response.OutputStream.Write(Encoding.UTF8.GetBytes(text), 0, Encoding.UTF8.GetBytes(text).Length);
291-
context.Response.OutputStream.Flush();
292-
}
288+
context.Response.OutputStream.Write(Encoding.UTF8.GetBytes(text), 0, Encoding.UTF8.GetBytes(text).Length);
289+
context.Response.OutputStream.Flush();
293290

294291
Thread.Sleep(50);
295292
}

web/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ <h4 class="modal-title lang-enter-peerid-title">Enter the PeerID</h4>
214214
initialise();
215215
}).fail(function () {
216216
console.log("Failed loading cities");
217-
loadScripts();
217+
setTimeout(loadScripts, 250);
218218
});
219219
}).fail(function () {
220220
console.log("Failed loading stations");
221-
loadScripts();
221+
setTimeout(loadScripts, 250);
222222
});
223223
}
224224
loadScripts();

0 commit comments

Comments
 (0)