Commit 70c94bca authored by Leigh Stoller's avatar Leigh Stoller

Turn on socket keep alives so that long running connections (say,

statewait) are not killed by the stateful firewall.
parent 4eeb7e8c
#!/usr/local/bin/python
#
# Copyright (c) 2005-2015 University of Utah and the Flux Group.
# Copyright (c) 2005-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -28,6 +28,7 @@ import pwd
import traceback
import syslog
import string
import socket
import BaseHTTPServer
......@@ -480,6 +481,13 @@ class MyServer(SSL.ForkingSSLServer, SimpleXMLRPCDispatcher):
try:
self.setupuser(request, client_address);
#
# New stateful firewall kills long term connections, as
# for state waiting.
#
request.socket.setsockopt(socket.SOL_SOCKET,
socket.SO_KEEPALIVE, 1);
# Remove the old path since the user can request a different
# one.
sys.path.remove(TBPATH)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment