Merge pull request #1 from dougnd/disconnect-on-forced-logout

Disconnect on logout.
This commit is contained in:
jeffreydwalter 2018-12-10 00:19:00 -06:00 committed by GitHub
commit 8875cd5466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,9 @@ func (e *eventStream) listen() (connected chan bool) {
break break
} }
if notifyResponse.Action == "logout" {
e.disconnect()
}
if notifyResponse.Status == "connected" { if notifyResponse.Status == "connected" {
connected <- true connected <- true
} else if notifyResponse.Status == "disconnected" { } else if notifyResponse.Status == "disconnected" {