Specified threading mode in server.py

This commit is contained in:
uh_wot 2020-05-19 21:14:46 +02:00
parent 3903874552
commit 47c6fe50a2

View file

@ -39,10 +39,10 @@ def resource_path(relative_path):
return path.join(base_path, relative_path)
gui_dir = resource_path("public")
gui_dir = resource_path('public')
server = CustomFlask(__name__, static_folder=gui_dir, template_folder=gui_dir)
server.config['SEND_FILE_MAX_AGE_DEFAULT'] = 1 # disable caching
socketio = SocketIO(server)
socketio = SocketIO(server, async_mode='threading')
class SocketInterface(MessageInterface):
def send(self, message, value=None):