summaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
authorLawnCable <lawncable.tmw2@simonlaux.de>2018-06-29 00:08:32 +0200
committerLawnCable <lawncable.tmw2@simonlaux.de>2018-06-29 00:08:32 +0200
commit49f3654d60267a8d66850297f843022706d76ba2 (patch)
treef79d39dba0ea750673de57808f434838368ac157 /src/renderer
parent0227331ff38716076ea0e6b2bdd6ec76b178b5e6 (diff)
parent5fcd4751188ce49ccd04e710b990711ae236e180 (diff)
downloadelectron-49f3654d60267a8d66850297f843022706d76ba2.tar.gz
electron-49f3654d60267a8d66850297f843022706d76ba2.tar.bz2
electron-49f3654d60267a8d66850297f843022706d76ba2.tar.xz
electron-49f3654d60267a8d66850297f843022706d76ba2.zip
Merge branch 'master' into onlineCount
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/gameserver/TOSCheck.ts3
-rw-r--r--src/renderer/gameserver/news.ts3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/renderer/gameserver/TOSCheck.ts b/src/renderer/gameserver/TOSCheck.ts
index 8dc29f2..e2e4bfc 100644
--- a/src/renderer/gameserver/TOSCheck.ts
+++ b/src/renderer/gameserver/TOSCheck.ts
@@ -35,6 +35,9 @@ function request(url:string):Promise<string>{
return new Promise((res, rej)=>{
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
+ xhr.addEventListener("error", (ev)=>{
+ rej(ev);
+ });
xhr.onload = function() {
if (xhr.status === 200) {
res(xhr.responseText);
diff --git a/src/renderer/gameserver/news.ts b/src/renderer/gameserver/news.ts
index b748777..094172c 100644
--- a/src/renderer/gameserver/news.ts
+++ b/src/renderer/gameserver/news.ts
@@ -26,6 +26,9 @@ export namespace News { // Fetches only the most recent entry
function request(url:string):Promise<string>{
return new Promise((res, rej)=>{
var xhr = new XMLHttpRequest();
+ xhr.addEventListener("error", (ev)=>{
+ rej(ev);
+ });
xhr.open('GET', url);
xhr.onload = function() {
if (xhr.status === 200) {