Don't return CONNECTING bridge state if there's no session

This commit is contained in:
Tulir Asokan 2021-10-04 14:59:07 +03:00
parent cad99ece0a
commit f7b387a4ff

View file

@ -246,7 +246,7 @@ func (prov *ProvisioningAPI) BridgeStatePing(w http.ResponseWriter, r *http.Requ
} else {
remote.StateEvent = StateConnected
}
} else if user.Conn.IsLoginInProgress() {
} else if user.Conn.IsLoginInProgress() && user.Session != nil {
remote.StateEvent = StateConnecting
remote.Error = WAConnecting
} else if !user.Conn.IsConnected() && user.Session != nil {