nip77: more interface fixes to prevent channel deadlock.
This commit is contained in:
@@ -192,10 +192,12 @@ func (n *Negentropy) reconcileAux(reader *bytes.Reader) ([]byte, error) {
|
||||
if _, theyHave := theirItems[item.ID]; theyHave {
|
||||
// if we have and they have, ignore
|
||||
delete(theirItems, item.ID)
|
||||
} else if n.Haves != nil {
|
||||
// if we have and they don't, notify client
|
||||
if n.isClient {
|
||||
n.Haves <- item.ID
|
||||
} else {
|
||||
if n.Haves != nil {
|
||||
// if we have and they don't, notify client
|
||||
if n.isClient {
|
||||
n.Haves <- item.ID
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user