Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
chore: remove unnecessary channel drain code
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Mar 8, 2024
1 parent cc5b8c6 commit 737a35e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions ldk_event_broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ func (s *ldkEventBroadcastServer) Subscribe() chan *ldk_node.Event {

func (s *ldkEventBroadcastServer) CancelSubscription(channel chan *ldk_node.Event) {
close(channel)
// make sure the channel is drained after closing it
out:
for {
select {
case _, ok := <-channel:
if !ok {
break out
}
default:
break out
}
}
s.removeListener <- channel
}

Expand Down

0 comments on commit 737a35e

Please sign in to comment.