mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
remove race condition in setting peer.close by requiring it as an argument to newPeer
This commit is contained in:
parent
5ddf84f329
commit
2f8dd5dde0
4 changed files with 7 additions and 11 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue