mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 01:53:28 +00:00
Fallback to older eventlet signature
Older eventlet did not understand some arguments on wsgi. Fallback to not using those arguments if unavailable.
This commit is contained in:
parent
57e23a6f52
commit
f7f8247d02
@ -791,8 +791,12 @@ def serve(bind_host, bind_port):
|
||||
eventlet.sleep(1)
|
||||
# TCP_FASTOPEN
|
||||
sock.setsockopt(socket.SOL_TCP, 23, 5)
|
||||
eventlet.wsgi.server(sock, resourcehandler, log=False, log_output=False,
|
||||
debug=False, socket_timeout=60)
|
||||
try:
|
||||
eventlet.wsgi.server(sock, resourcehandler, log=False, log_output=False,
|
||||
debug=False, socket_timeout=60)
|
||||
except InvalidTypeError:
|
||||
# Older eventlet in place, skip arguments it does not understand
|
||||
eventlet.wsgi.server(sock, resourcehandler, log=False, debug=False)
|
||||
|
||||
|
||||
class HttpApi(object):
|
||||
|
Loading…
Reference in New Issue
Block a user