Skip to content
Snippets Groups Projects
Commit 0d454dcf authored by Taya Snijder's avatar Taya Snijder
Browse files

removed exceptions, instead just throws an error now for the caller to deal with

parent b1330998
No related branches found
No related tags found
1 merge request!155L2SS-399: added reconnect option
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment