mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-20 02:27:21 +01:00
419c2ac206
This commit fixes a race condition that was introduced while fixing a lingering bug in the logic to notify block epoch clients. The race condition would happen as by removing the default case in the select statement, it was now possible for the client’s block epoch client to be closed while the routine was attempting a send on it. We now eliminate this race condition possibility by adding a wait group to all goroutines launched to dispatch a block epoch notification. With this modification, the Stop() goroutine will now wait for all other goroutine to exit before closing the block epoch channels of all currently registered clients. |
||
---|---|---|
.. | ||
btcd.go | ||
confheap.go | ||
driver.go |