vpn: API issues event saying VPN is down when it should be in a connecting state.
right after the ui does a bitmask.vpn.start()
, the VPN_STATUS_CHANGED
event is fired, and then polling the status gives {status: "off", down: null, domain: "demo.bitmask.net", error: null, up: null}
this causes odd behavior in the UI: you hit the on button, then vpn briefly show connecting (initial state set by UI, in anticipation that this will be the correct state), then vpn shows off (because of event from the backend), then vpn shows on again (because of final event from backend).
expected behavior: the status should not ever return that the vpn is down after start() has been called. it should either be in some kind of connecting state forever, or some kind of error state if there was a critical error that could not be recovered from (like it could not open a socket to communicate with openvpn).