Skip to content

Commit 201ac5b

Browse files
committed
Erase previous errors upon successful connect
Fixes jobec#31
1 parent 9c4f669 commit 201ac5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rfc5424logging/transport.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def open(self):
3737
self.socket = socket.socket(family, socktype)
3838
self.socket.settimeout(self.timeout)
3939
self.socket.connect(sockaddr)
40+
# Connected successfully. Erase any previous errors.
41+
error = None
4042
break
4143
except OSError as e:
4244
error = e

0 commit comments

Comments
 (0)