Github Mirror / telegraf-plugins: eec62d22




Return LP if we fail to connect to the controlport

Return LP if we fail to connect to the controlport

Commit eec62d22.

Authored 2022-05-11T19:30:27.000+01:00 by B Tasker in project Github Mirror / telegraf-plugins

+9 lines -4 lines

Commit Signature

Changes

diff --git a/tor-daemon/tor-daemon.py b/tor-daemon/tor-daemon.py
--- a/tor-daemon/tor-daemon.py
+++ b/tor-daemon/tor-daemon.py
# @@ -129,10 +129,15 @@ state = {
# }
#
# # Initialise a connection
# -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# -s.connect((CONTROL_H, int(CONTROL_P)))
# -s.setblocking(0)
# -
# +try:
# + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# + s.connect((CONTROL_H, int(CONTROL_P)))
# + s.setblocking(0)
# +except:
# + state["stats_failures"] += 1
# + print(build_lp(MEASUREMENT, state))
# + sys.exit(1)
# +
#
# # Login
# cmd = 'AUTHENTICATE "' + AUTH + '"'
#