We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70377a6 commit 24ba3cfCopy full SHA for 24ba3cf
pubsub.go
@@ -435,7 +435,7 @@ func (c *PubSub) initChannel() {
435
timer := time.NewTimer(timeout)
436
timer.Stop()
437
438
- var healthy bool
+ healthy := true
439
var pingErr error
440
for {
441
timer.Reset(timeout)
@@ -446,9 +446,9 @@ func (c *PubSub) initChannel() {
446
<-timer.C
447
}
448
case <-timer.C:
449
+ pingErr = c.Ping()
450
if healthy {
451
healthy = false
- pingErr = c.Ping()
452
} else {
453
c.mu.Lock()
454
c._reconnect(pingErr)
0 commit comments