normal websocket
This commit is contained in:
1 parent
4bf7700886
commit
6a56e5a921
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -18,7 +18,7 @@ from flask_socketio import SocketIO, emit, join_room
|
|||||||
|
|
||||||
application = Flask(__name__)
|
application = Flask(__name__)
|
||||||
application.secret_key = secrets.token_hex(64)
|
application.secret_key = secrets.token_hex(64)
|
||||||
websocket_manager = SocketIO(application, manage_session=False, async_mode='threading')
|
websocket_manager = SocketIO(application, manage_session=False)
|
||||||
scheduler_instance = BackgroundScheduler(timezone="Europe/Berlin")
|
scheduler_instance = BackgroundScheduler(timezone="Europe/Berlin")
|
||||||
european_timezone = zoneinfo.ZoneInfo("Europe/Berlin")
|
european_timezone = zoneinfo.ZoneInfo("Europe/Berlin")
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -281,7 +281,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (typeof io !== "undefined") {
|
if (typeof io !== "undefined") {
|
||||||
websocket_connection = io({ transports: ["polling"], upgrade: false });
|
websocket_connection = io();
|
||||||
|
|
||||||
websocket_connection.on("game_state_changed", function() {
|
websocket_connection.on("game_state_changed", function() {
|
||||||
if (document.querySelector(".game-section") || document.querySelector(".administrator-section")) {
|
if (document.querySelector(".game-section") || document.querySelector(".administrator-section")) {
|
||||||
|
|||||||
Reference in new issue
Block a user