Skip to content

Commit 0f83702

Browse files
beshr-eldebuchjustinmayhew
authored andcommitted
Enable TCP keepalive
1 parent 68dd41f commit 0f83702

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/greenstalk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def __init__(
291291
self._address = address
292292
else:
293293
self._sock = socket.create_connection(address)
294+
self._sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
294295
self._address = address
295296

296297
self._reader = self._sock.makefile("rb")

0 commit comments

Comments
 (0)