MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / __ping

Method __ping

src/python/openvpn3/SessionManager.py:631–647  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

629 # if it isn't running yet.
630 #
631 def __ping(self):
632 delay = 0.5
633 attempts = 10
634
635 while attempts > 0:
636 try:
637 self.__peer_intf.Ping()
638 self.__prop_intf.Get('net.openvpn.v3.sessions', 'version')
639 return
640 except dbus.exceptions.DBusException as excp:
641 err = str(excp)
642 if err.find("org.freedesktop.DBus.Error.AccessDenied:") > 0:
643 raise RuntimeError("Access denied to the Session Manager (ping)")
644 time.sleep(delay)
645 delay *= 1.33
646 attempts -= 1
647 raise RuntimeError("Could not establish contact with the Session Manager")
648
649
650 ##

Callers 4

NewTunnelMethod · 0.95
RetrieveMethod · 0.95
LookupConfigNameMethod · 0.95

Calls 1

PingMethod · 0.80

Tested by

no test coverage detected