diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-09-16 23:16:00 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-09-16 23:16:00 -0400 |
commit | f625d280190fadc57feea6933b65076cc7ef9745 (patch) | |
tree | 48bc0031829e050cfec5922644404ff3bb009102 | |
parent | 1f86cc5f7773edaef2f8c9c5eb12774e81d1dc7b (diff) | |
download | python-termcast-server-f625d280190fadc57feea6933b65076cc7ef9745.tar.gz python-termcast-server-f625d280190fadc57feea6933b65076cc7ef9745.zip |
ignore SIGPIPE
this occurs sometimes when connections drop, and kills the server since
that's the default action for SIGPIPE
-rw-r--r-- | server.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1,3 +1,4 @@ +import signal import socket import sys import threading @@ -13,6 +14,7 @@ class Server(object): self.keyfile = keyfile def listen(self): + signal.signal(signal.SIGPIPE, signal.SIG_IGN) ssh_sock = self._open_socket(2200) termcast_sock = self._open_socket(2201) |