From 0d454dcf8982e6c9eff11b0f3da56a0d814e1db2 Mon Sep 17 00:00:00 2001
From: thijs snijder <snijder@astron.nl>
Date: Wed, 13 Oct 2021 11:04:42 +0200
Subject: [PATCH] removed exceptions, instead just throws an error now for the
 caller to deal with

---
 devices/statistics_writer/receiver.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/devices/statistics_writer/receiver.py b/devices/statistics_writer/receiver.py
index 278a800eb..716a15061 100644
--- a/devices/statistics_writer/receiver.py
+++ b/devices/statistics_writer/receiver.py
@@ -55,13 +55,10 @@ class tcp_receiver(receiver):
         super().__init__(fd=self.sock.fileno())
 
     def reconnect(self):
-        try:
-            self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-            self.sock.connect((self.host, self.port))
-            self.fd = self.sock.fileno()
-            return True
-        except ConnectionRefusedError:
-            return False
+        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+        self.sock.connect((self.host, self.port))
+        self.fd = self.sock.fileno()
+        return True
 
 
 class file_receiver(receiver):
-- 
GitLab