swarm/network: fix data race on TestService bucket caused by copying struct content without synchronisation

This commit is contained in:
Elad Nachmias 2019-01-16 20:44:50 +05:30
parent 4aeeecfded
commit 1b916f89c1

View file

@ -73,8 +73,7 @@ func NewEvent(v interface{}) *Event {
switch v := v.(type) {
case *Node:
event.Type = EventTypeNode
node := *v
event.Node = &node
event.Node = v
case *Conn:
event.Type = EventTypeConn
conn := *v