keepalive aktiviert
This commit is contained in:
parent
915d195d33
commit
cc77f32afa
1 changed files with 3 additions and 0 deletions
|
@ -233,6 +233,9 @@ def main():
|
||||||
|
|
||||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as mySocket:
|
with socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) as mySocket:
|
||||||
logging.debug('Socket created')
|
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:
|
try:
|
||||||
mySocket.bind((config['server']['host'], int(config['server']['port'])))
|
mySocket.bind((config['server']['host'], int(config['server']['port'])))
|
||||||
mySocket.listen(5)
|
mySocket.listen(5)
|
||||||
|
|
Loading…
Reference in a new issue