We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cf311a commit 7138332Copy full SHA for 7138332
client.go
@@ -312,11 +312,7 @@ func New(config Config) *Client {
312
// the event can't be sent within 30s.
313
func (c *Client) receive(e *Event) {
314
t := time.NewTimer(30 * time.Second)
315
- defer func() {
316
- if !t.Stop() {
317
- <-t.C
318
- }
319
- }()
+ defer t.Stop()
320
321
select {
322
case c.rx <- e:
conn.go
@@ -486,11 +486,7 @@ func (c *Client) write(event *Event) {
486
}
487
488
489
490
491
492
493
494
495
496
case c.tx <- event:
0 commit comments