rpc: wrap canceling a breach watch in a select case

This commit is contained in:
Olaoluwa Osuntokun committed 2017-08-03 16:40:15 -07:00
1 parent c183e8984c
commit d39410cc01
2 files changed
+6 -1

No files matched your search

+1
View File
@@ -165,6 +165,7 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
s.htlcSwitch = htlcswitch.New(htlcswitch.Config{
LocalChannelClose: func(pubKey []byte,
request *htlcswitch.ChanClose) {
s.peersMtx.RLock()
peer, ok := s.peersByPub[string(pubKey)]
s.peersMtx.RUnlock()