summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-16 20:31:13 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-16 20:31:13 -0300
commit95b71c79d44c3e0718a726e550715b7dbc699e7e (patch)
tree03ff02c7a9bc9c1fa50c971881aa2022fde614a8 /game
parent6a3f9f080dd41ad4bd6e3cd9c9cc9ea5151a56f9 (diff)
downloadclient-95b71c79d44c3e0718a726e550715b7dbc699e7e.tar.gz
client-95b71c79d44c3e0718a726e550715b7dbc699e7e.tar.bz2
client-95b71c79d44c3e0718a726e550715b7dbc699e7e.tar.xz
client-95b71c79d44c3e0718a726e550715b7dbc699e7e.zip
Do not declare ws at init phase
Diffstat (limited to 'game')
-rw-r--r--game/03_init.rpy2
-rw-r--r--game/script.rpy17
2 files changed, 2 insertions, 17 deletions
diff --git a/game/03_init.rpy b/game/03_init.rpy
index 1125462..66b05a3 100644
--- a/game/03_init.rpy
+++ b/game/03_init.rpy
@@ -309,5 +309,3 @@ init python:
MUSIC_PROLOGUE02=RetString("sfx/prologue.mp3")
MUSIC_PROLOGUE03=RetString("sfx/shining.mp3")
- ws = None
-
diff --git a/game/script.rpy b/game/script.rpy
index b224474..dd3ee56 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -34,20 +34,7 @@ label start:
#"We shall now begin testing a websocket"
python:
- # FIXME: Broken code
- if (ws is not None):
- stdout("Socket exists, trying to reuse connection...")
- try:
- boom = send_packet_now("ping")
- if not boom:
- del boom
- raise
- del boom
- except:
- ws = None
-
- if ws is None:
- try:
+ try:
# server, sock, address
# on_open=None, on_message=None, on_error=None,
# on_close=None, on_ping=None, on_pong=None,
@@ -66,7 +53,7 @@ label start:
on_message=onmsg)
ws.on_open = onopen
renpy.invoke_in_thread(ws.run_forever)
- except:
+ except:
# Enter in infinite loop, this will never resolve
stdout("Unrecoverable error, the program is dead.")
tr_load=False