mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-31 03:51:29 +02:00
[client] Drain buffered tick when coalesce window expires
This commit is contained in:
@@ -73,6 +73,14 @@ func collectStatusBurst(ctx context.Context, ch <-chan struct{}) (pending, open
|
||||
}
|
||||
pending = true
|
||||
case <-timer.C:
|
||||
select {
|
||||
case _, ok := <-ch:
|
||||
if !ok {
|
||||
return pending, false
|
||||
}
|
||||
pending = true
|
||||
default:
|
||||
}
|
||||
return pending, true
|
||||
case <-ctx.Done():
|
||||
return false, false
|
||||
|
||||
Reference in New Issue
Block a user