Permalink
Browse files

Should fix an issue where the tproxy daemon keeps crashing on bad con…

…nection closes.
  • Loading branch information...
micolous committed Oct 17, 2012
1 parent d2bb482 commit 2c718d48b45e70897b176c1f22af66d63fa9b1a2
Showing with 5 additions and 1 deletion.
  1. +5 −1 tollgate/captive_landing/tproxy.py
@@ -77,7 +77,11 @@ def run(self):
self.httpd.socket.setsockopt(SOL_IP, IP_TRANSPARENT, self.mark)
while self.keep_running:
- self.httpd.handle_request()
+ try:
+ self.httpd.handle_request()
+ except:
+ # don't die when there's a pathetic error
+ pass

This comment has been minimized.

Show comment Hide comment
@twoolie

twoolie Oct 17, 2012

logger.exception("tproxy died with a pathetic error")?

@twoolie

twoolie Oct 17, 2012

logger.exception("tproxy died with a pathetic error")?

def main_optparse():
"Entrypoint for the tproxy handler, that uses optparse to parse commandline arguments."

0 comments on commit 2c718d4

Please sign in to comment.