Skip to content

Commit

Permalink
chore: revert closing channel
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Nov 9, 2024
1 parent cf225ab commit 80d5add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/grpc/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ func (blockAPI *BlockAPI) removeHeightListener(ch chan NewHeightEvent) {
blockAPI.Lock()
defer blockAPI.Unlock()
delete(blockAPI.heightListeners, ch)
close(ch)
}

func (blockAPI *BlockAPI) closeAllListeners() {
blockAPI.Lock()
defer blockAPI.Unlock()
for channel := range blockAPI.heightListeners {
delete(blockAPI.heightListeners, channel)
close(channel)
}
}

Expand Down

0 comments on commit 80d5add

Please sign in to comment.