2
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-18 03:25:37 +00:00

Fix tornado deprecation warning

This commit is contained in:
Ozzie Isaacs 2023-12-30 19:08:57 +01:00
parent d272f43424
commit 00acd745f4

View File

@ -21,6 +21,7 @@ import os
import errno
import signal
import socket
import asyncio
try:
from gevent.pywsgi import WSGIServer
@ -326,4 +327,5 @@ class WebServer(object):
if restart:
self.wsgiserver.call_later(1.0, self.wsgiserver.stop)
else:
self.wsgiserver.add_callback_from_signal(self.wsgiserver.stop)
self.wsgiserver.asyncio_loop.call_soon_threadsafe(self.wsgiserver.stop)