def disconnect(self, wait):
# Disconnect any active VPN connection. Return True when the connection has disconnected. If there's
# not an active connection, return True anyway. The wait parameter will determine if the function returns
# once the connection has been made, or if it's fire and forget (in which case True will be returned regardless)
if not self.isVPNSetUp(): return False
if self.getConnected() == "": return True
xbmc.log(msg="VPN Mgr API : Disconnecting", level=xbmc.LOGDEBUG)
self.setAPICommand("Disconnect")
if wait: return self.waitForConnection("")
return True
评论列表
文章目录