-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid panic on multiple closer.Signal calls (#1401)
The closer.Signal function closes a channel and multiple calls to the closing the same channel would cause a "channel already closed". This PR avoids the panic by using a sync.Once while closing the channel. Multiple calls to closer.Signal would be no-op with this commit. Fixes DGRAPH-1581
- Loading branch information
Ibrahim Jarif
committed
Oct 2, 2020
1 parent
4eeba5a
commit e9e8f23
Showing
2 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters