2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-09-03 16:58:25 +00:00

Make TCP_FASTOPEN opportunistic

Certain Linux-like but not Linux environments fail
at this.
This commit is contained in:
Jarrod Johnson
2019-06-27 15:36:27 -04:00
parent c633286019
commit 6d5f0cdb16

View File

@@ -794,7 +794,10 @@ def serve(bind_host, bind_port):
' a second\n')
eventlet.sleep(1)
# TCP_FASTOPEN
sock.setsockopt(socket.SOL_TCP, 23, 5)
try:
sock.setsockopt(socket.SOL_TCP, 23, 5)
except Exception:
pass # we gave it our best shot there
try:
eventlet.wsgi.server(sock, resourcehandler, log=False, log_output=False,
debug=False, socket_timeout=60)