Feedback as per @mlctrez
This commit is contained in:
parent
2d731e0393
commit
b79f4c8f6d
|
@ -29,7 +29,7 @@ const (
|
|||
DefaultMaxReconnectInterval = 64
|
||||
|
||||
// DefaultPingInterval is the default time interval (in seconds) between pings
|
||||
DefaultPingInterval = 5
|
||||
DefaultPingInterval = 60
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -290,6 +290,8 @@ func (s *Subscriber) writeloop(ctx context.Context, conn *websocket.Conn) {
|
|||
t := time.NewTicker(s.pingInterval)
|
||||
s.RUnlock()
|
||||
|
||||
defer t.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
|
|
Loading…
Reference in New Issue