From 60301c9892efb72eee3a2084855744d15c602496 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Wed, 21 Dec 2022 19:34:26 -0500 Subject: [PATCH] check rt --- pkg/wsapi/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/wsapi/api.go b/pkg/wsapi/api.go index f07cf39..50593c3 100644 --- a/pkg/wsapi/api.go +++ b/pkg/wsapi/api.go @@ -104,7 +104,7 @@ func (ws *wsSession) Go(ctx context.Context) error { } err = authP.handleMsg(ctx, rdr) - if err != nil { + if err != nil || ws.refreshToken == nil { return err } @@ -158,7 +158,7 @@ func (ws *wsSession) Go(ctx context.Context) error { log.Error().Err(err).Msg("handleMsg") } case <-ctx.Done(): - close(msgChan) + close(msgChan) // maybe remove this? return nil case m := <-write: err := ws.conn.WriteJSON(m)