mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-19 06:54:47 +08:00
Removed old signals
This commit is contained in:
5
event.go
5
event.go
@@ -29,11 +29,10 @@ func (e *Event) Clear() {
|
||||
}
|
||||
|
||||
func (e *Event) Fire() {
|
||||
if e == nil || atomic.SwapInt32(&e.guard, 1) != 0 {
|
||||
if atomic.SwapInt32(&e.guard, 1) != 0 {
|
||||
return
|
||||
}
|
||||
now := time.Now()
|
||||
if e.next.After(now) {
|
||||
if now := time.Now(); now.After(e.next) {
|
||||
select {
|
||||
case e.C <- struct{}{}:
|
||||
default:
|
||||
|
Reference in New Issue
Block a user