mirror of
https://github.com/safing/portmaster
synced 2025-09-02 18:49:14 +00:00
Fix panic when nobody waits for a geoip database
This commit is contained in:
parent
f428f338b5
commit
65825fe06e
1 changed files with 3 additions and 0 deletions
|
@ -67,6 +67,9 @@ func (ub *updateBroadcaster) ReplaceDatabase(db *geoIPDB) {
|
||||||
// notifyWaiters notifies and removes all waiters. Must be called
|
// notifyWaiters notifies and removes all waiters. Must be called
|
||||||
// with ub.rw locked.
|
// with ub.rw locked.
|
||||||
func (ub *updateBroadcaster) notifyWaiters() {
|
func (ub *updateBroadcaster) notifyWaiters() {
|
||||||
|
if ub.waiter == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
waiter := ub.waiter
|
waiter := ub.waiter
|
||||||
ub.waiter = nil
|
ub.waiter = nil
|
||||||
close(waiter)
|
close(waiter)
|
||||||
|
|
Loading…
Add table
Reference in a new issue