Enable TCP keepalives
This commit is contained in:
parent
2a93a8f1dd
commit
5b780672a8
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ class Socket(IRCObject.Object):
|
||||||
bindhost = (self._bindhost, 0)
|
bindhost = (self._bindhost, 0)
|
||||||
self._socket = socket.create_connection((self._hostname, self._port),
|
self._socket = socket.create_connection((self._hostname, self._port),
|
||||||
5.0, bindhost)
|
5.0, bindhost)
|
||||||
|
self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||||
|
|
||||||
if self._tls:
|
if self._tls:
|
||||||
self._tls_wrap()
|
self._tls_wrap()
|
||||||
|
|
Loading…
Reference in a new issue