From aa17363ac88c4dbf81804adf7f5781112d9570af Mon Sep 17 00:00:00 2001 From: Douglas Dawson Date: Sun, 9 Dec 2018 12:40:24 -0500 Subject: [PATCH] Disconnect on logout. --- events_stream.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/events_stream.go b/events_stream.go index e946236..cb97b78 100644 --- a/events_stream.go +++ b/events_stream.go @@ -102,6 +102,9 @@ func (e *eventStream) listen() (connected chan bool) { break } + if notifyResponse.Action == "logout" { + e.disconnect() + } if notifyResponse.Status == "connected" { connected <- true } else if notifyResponse.Status == "disconnected" {