Added TODO comment for the is_alive() check.
In an ideal situation, the marked check should not be needed, and we should just be able to validate if the client is connected or not. Unfortunately, the boinc_client code does not gracefully handle the case of the remote end not being connected, so we need to check at a lower level that the TCP connection is still in a CONNECTED state.
Austin S. Hemmelgarn committed
Jun 5, 2018 at 10:57 UTC
e88af21a0b8b2ce415f0a94be0bdde421ef6260b
1 file changed
+4
python.d/boinc.chart.py
+4
@@ -139,6 +139,10 @@ class Service(SimpleService):
139
140
def is_alive(self):
141
if (not self.alive) or \
142
+ # TODO: This final check should ideally not be needed, but the
143
+ # boinc_client code does not currenlty handle remote disconnects
144
+ # gracefully in a threaded environment. This is the only thing
145
+ # making this module Linux specific.
146
self.client.rpc.sock.getsockopt(socket.IPPROTO_TCP, socket.TCP_INFO, 0) != 1:
147
return self.reconnect()
148
return True