From cc77f32afab667c1846c356ec7001e3711768130 Mon Sep 17 00:00:00 2001 From: +++ Date: Thu, 22 Oct 2020 16:07:16 +0200 Subject: [PATCH] keepalive aktiviert --- apistatusd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apistatusd.py b/apistatusd.py index 6d5a908..2f97f1b 100755 --- a/apistatusd.py +++ b/apistatusd.py @@ -233,6 +233,9 @@ def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as mySocket: logging.debug('Socket created') + mySocket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) + keep = mySocket.getsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE) + logging.debug('Socket keepalive: {}'format(keep)) try: mySocket.bind((config['server']['host'], int(config['server']['port']))) mySocket.listen(5)