use before set, see #174 (thanks to @Glandos)
This commit is contained in:
parent
0e9dcba5b6
commit
d7bfbc7182
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user