mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-27 02:20:31 +00:00
Merge remote-tracking branch 'ipv6/ipv4only'
This commit is contained in:
commit
b6f06658a2
@ -79,6 +79,7 @@ import hashlib
|
|||||||
from redirect import redirect_back, is_safe_url
|
from redirect import redirect_back, is_safe_url
|
||||||
|
|
||||||
from tornado import version as tornadoVersion
|
from tornado import version as tornadoVersion
|
||||||
|
from socket import error as SocketError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
@ -3097,5 +3098,11 @@ def upload():
|
|||||||
def start_gevent():
|
def start_gevent():
|
||||||
from gevent.wsgi import WSGIServer
|
from gevent.wsgi import WSGIServer
|
||||||
global gevent_server
|
global gevent_server
|
||||||
|
try:
|
||||||
gevent_server = WSGIServer(('', ub.config.config_port), app)
|
gevent_server = WSGIServer(('', ub.config.config_port), app)
|
||||||
gevent_server.serve_forever()
|
gevent_server.serve_forever()
|
||||||
|
except SocketError:
|
||||||
|
app.logger.info('Unable to listen on \'\', trying on IPv4 only...')
|
||||||
|
gevent_server = WSGIServer(('0.0.0.0', ub.config.config_port), app)
|
||||||
|
gevent_server.serve_forever()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user