Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
fix: initialize circuitAddr after initializing the protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Sep 18, 2019
1 parent 9e6dd2b commit 147eb33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ var Protocol = ma.Protocol{
VCode: ma.CodeToVarint(P_CIRCUIT),
}

var circuitAddr ma.Multiaddr = ma.Cast(Protocol.VCode)
var circuitAddr ma.Multiaddr

func init() {
ma.AddProtocol(Protocol)
circuitAddr = ma.Cast(Protocol.VCode)
}

var _ transport.Transport = (*RelayTransport)(nil)
Expand Down

0 comments on commit 147eb33

Please sign in to comment.