server: properly unlock within openchannel if peer not found
This commit is contained in:
parent
147596047f
commit
3f5ec99330
@ -2767,6 +2767,8 @@ func (s *server) OpenChannel(
|
||||
s.mu.RLock()
|
||||
peer, ok := s.peersByPub[string(pubKeyBytes)]
|
||||
if !ok {
|
||||
s.mu.RUnlock()
|
||||
|
||||
req.err <- fmt.Errorf("peer %x is not online", pubKeyBytes)
|
||||
return req.updates, req.err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user