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)
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)