From: Peter Müller Date: Tue, 13 Dec 2022 15:26:45 +0000 (+0000) Subject: Revert "openvpn-authenticator: Break read loop when daemon goes away" X-Git-Tag: v2.27-core172~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d4110d214cd2b7bae59a560f01a3ed3501a98c8;p=ipfire-2.x.git Revert "openvpn-authenticator: Break read loop when daemon goes away" This reverts commit 7ec3664c320707b51407fce854e19b6254eb4836. --- diff --git a/config/ovpn/openvpn-authenticator b/config/ovpn/openvpn-authenticator index 4341993e6d..c22e08f0a9 100644 --- a/config/ovpn/openvpn-authenticator +++ b/config/ovpn/openvpn-authenticator @@ -68,12 +68,6 @@ class OpenVPNAuthenticator(object): while True: char = self.sock.recv(1) - - # Break if we could not read from the socket - if not char: - raise EOFError("Could not read from socket") - - # Append to buffer buf.append(char) # Reached end of line @@ -118,7 +112,7 @@ class OpenVPNAuthenticator(object): self._client_event(line) # Terminate the daemon when it loses its connection to the OpenVPN daemon - except (ConnectionResetError, EOFError) as e: + except ConnectionResetError as e: log.error("Connection to OpenVPN has been lost: %s" % e) log.info("OpenVPN Authenticator terminated")