Skip to content

Commit

Permalink
Check ctx.Err() is err.canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
nobl9-adam-szymanski committed Aug 24, 2021
1 parent c49953b commit 220c2b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions signalflow/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ func (c *wsConn) Run() {

for {
if conn == nil {
select {
case <-c.ctx.Done():
if c.ctx.Err() == context.Canceled {
log.Printf("Context cancelled, stop reconnecting.")
return
}
Expand Down

0 comments on commit 220c2b4

Please sign in to comment.