diff --git a/cmd/magneticod/dht/mainline/protocol.go b/cmd/magneticod/dht/mainline/protocol.go index 9a88ac3..92c7661 100644 --- a/cmd/magneticod/dht/mainline/protocol.go +++ b/cmd/magneticod/dht/mainline/protocol.go @@ -36,8 +36,8 @@ type ProtocolEventHandlers struct { func NewProtocol(laddr string, eventHandlers ProtocolEventHandlers) (p *Protocol) { p = new(Protocol) - p.transport = NewTransport(laddr, p.onMessage, p.eventHandlers.OnCongestion) p.eventHandlers = eventHandlers + p.transport = NewTransport(laddr, p.onMessage, p.eventHandlers.OnCongestion) p.currentTokenSecret, p.previousTokenSecret = make([]byte, 20), make([]byte, 20) _, err := rand.Read(p.currentTokenSecret)