Skip to content

Commit 22e2b5c

Browse files
committed
remove unnecessary ticker
1 parent 6a8ac6c commit 22e2b5c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

client.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ func (c *Client) run() {
129129

130130
// flusher amortizes flushing costs for high activity SSE channels
131131
func (c *Client) flusher() {
132-
ticker := time.NewTicker(100 * time.Millisecond)
133-
134132
for {
135-
<-ticker.C
133+
time.Sleep(100 * time.Millisecond)
136134
c.lock.Lock()
137135
if c.closed {
138136
break
@@ -144,6 +142,5 @@ func (c *Client) flusher() {
144142
c.lock.Unlock()
145143
}
146144

147-
ticker.Stop()
148145
c.waiter.Done()
149146
}

0 commit comments

Comments
 (0)