]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/ovpn/openvpn-authenticator
Revert "openvpn-authenticator: Avoid infinite loop when losing socket connection"
[ipfire-2.x.git] / config / ovpn / openvpn-authenticator
index c22e08f0a99a4ddbcbf4569947582fefd88a959d..36374caf8376cd4ed9ed7b809e846bcbf959a9e3 100644 (file)
@@ -104,16 +104,11 @@ class OpenVPNAuthenticator(object):
 
                log.info("OpenVPN Authenticator started")
 
-               try:
-                       while True:
-                               line = self._read_line()
-
-                               if line.startswith(">CLIENT"):
-                                       self._client_event(line)
+               while True:
+                       line = self._read_line()
 
-               # Terminate the daemon when it loses its connection to the OpenVPN daemon
-               except ConnectionResetError as e:
-                       log.error("Connection to OpenVPN has been lost: %s" % e)
+                       if line.startswith(">CLIENT"):
+                               self._client_event(line)
 
                log.info("OpenVPN Authenticator terminated")
 
@@ -262,7 +257,7 @@ class OpenVPNAuthenticator(object):
        @staticmethod
        def _b64decode(s):
                return base64.b64decode(s.encode()).decode()
-
+               
        @staticmethod
        def _escape(s):
                return s.replace(" ", "\ ")