remove race condition in setting peer.close by requiring it as an argument to newPeer

This commit is contained in:
Arceliar 2019-02-03 15:50:25 -06:00
parent 5ddf84f329
commit 2f8dd5dde0
4 changed files with 7 additions and 11 deletions

View file

@ -97,9 +97,7 @@ func (c *Core) DEBUG_getPeers() *peers {
}
func (ps *peers) DEBUG_newPeer(box crypto.BoxPubKey, sig crypto.SigPubKey, link crypto.BoxSharedKey) *peer {
//in <-chan []byte,
//out chan<- []byte) *peer {
return ps.newPeer(&box, &sig, &link, "(simulator)") //, in, out)
return ps.newPeer(&box, &sig, &link, "(simulator)", nil)
}
/*