This commit is contained in:
Daniel Ponte 2022-12-21 19:34:26 -05:00
parent 14401c831a
commit 60301c9892

View file

@ -104,7 +104,7 @@ func (ws *wsSession) Go(ctx context.Context) error {
} }
err = authP.handleMsg(ctx, rdr) err = authP.handleMsg(ctx, rdr)
if err != nil { if err != nil || ws.refreshToken == nil {
return err return err
} }
@ -158,7 +158,7 @@ func (ws *wsSession) Go(ctx context.Context) error {
log.Error().Err(err).Msg("handleMsg") log.Error().Err(err).Msg("handleMsg")
} }
case <-ctx.Done(): case <-ctx.Done():
close(msgChan) close(msgChan) // maybe remove this?
return nil return nil
case m := <-write: case m := <-write:
err := ws.conn.WriteJSON(m) err := ws.conn.WriteJSON(m)