OSX NameError fix
Had the following error when trying to run Reticulum on OSX High Sierra: line 115, in set_timeouts_osx sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) NameError: name 'sock' is not defined This fix resolved the problem for me.
This commit is contained in:
parent
485558cd6b
commit
b96cbf1014
@ -112,8 +112,8 @@ class TCPClientInterface(Interface):
|
|||||||
else:
|
else:
|
||||||
TCP_KEEPIDLE = 0x10
|
TCP_KEEPIDLE = 0x10
|
||||||
|
|
||||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||||
sock.setsockopt(socket.IPPROTO_TCP, TCP_KEEPIDLE, int(TCPClientInterface.TCP_PROBE_AFTER))
|
self.socket.setsockopt(socket.IPPROTO_TCP, TCP_KEEPIDLE, int(TCPClientInterface.TCP_PROBE_AFTER))
|
||||||
|
|
||||||
def detach(self):
|
def detach(self):
|
||||||
if self.socket != None:
|
if self.socket != None:
|
||||||
@ -421,4 +421,4 @@ class TCPInterfaceHandler(socketserver.BaseRequestHandler):
|
|||||||
socketserver.BaseRequestHandler.__init__(self, *args, **keys)
|
socketserver.BaseRequestHandler.__init__(self, *args, **keys)
|
||||||
|
|
||||||
def handle(self):
|
def handle(self):
|
||||||
self.callback(handler=self)
|
self.callback(handler=self)
|
||||||
|
Loading…
Reference in New Issue
Block a user