summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-15 23:33:25 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-15 23:33:25 -0300
commit227654c7d0594b73afe68736e50403cf939ed32f (patch)
tree1f00b9ce3224f4beeb39f651e4dbf99c6769b701
parent2d881070bcccaaabbef8ca34d7c31067ccd68d19 (diff)
downloadclient-227654c7d0594b73afe68736e50403cf939ed32f.tar.gz
client-227654c7d0594b73afe68736e50403cf939ed32f.tar.bz2
client-227654c7d0594b73afe68736e50403cf939ed32f.tar.xz
client-227654c7d0594b73afe68736e50403cf939ed32f.zip
Do not pass SSLOPT on non-SSL connections
-rw-r--r--game/script.rpy10
1 files changed, 6 insertions, 4 deletions
diff --git a/game/script.rpy b/game/script.rpy
index 80d369a..c69e546 100644
--- a/game/script.rpy
+++ b/game/script.rpy
@@ -94,22 +94,24 @@ label start:
ws = None
if ws is None:
- stdout("Opening new socket...")
# server, sock, address
# on_open=None, on_message=None, on_error=None,
# on_close=None, on_ping=None, on_pong=None,
# on_data=None):
if (persistent.ssl_enabled):
+ stdout(_("Opening new secure socket..."))
ws = wsock.WebSocketApp("wss://"+HOST+":61000",
on_data=ondata, on_error=onerror, on_open=onopen,
on_message=onmsg)
+ ws.on_open = onopen
+ renpy.invoke_in_thread(ws.run_forever, sslopt={"cert_reqs": CERT_NONE})
else:
+ stdout(_("Opening new socket..."))
ws = wsock.WebSocketApp("ws://"+HOST+":61000",
on_data=ondata, on_error=onerror, on_open=onopen,
on_message=onmsg)
- print repr(ws)
- ws.on_open = onopen
- renpy.invoke_in_thread(ws.run_forever, sslopt={"cert_reqs": CERT_NONE})
+ ws.on_open = onopen
+ renpy.invoke_in_thread(ws.run_forever)
#ws.connect("wss://localhost:61000")
while not tr_load: