Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
9a9a8de2
Commit
9a9a8de2
authored
8 years ago
by
Jeromy
Browse files
Options
Download
Email Patches
Plain Diff
don't wrap conns with metrics if bwc is nil
parent
ab39c6f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
p2p/net/swarm/swarm.go
+5
-2
p2p/net/swarm/swarm.go
with
5 additions
and
2 deletions
+5
-2
p2p/net/swarm/swarm.go
View file @
9a9a8de2
...
...
@@ -109,8 +109,11 @@ func NewSwarm(ctx context.Context, listenAddrs []ma.Multiaddr,
return
nil
,
err
}
wrap
:=
func
(
c
transport
.
Conn
)
transport
.
Conn
{
return
mconn
.
WrapConn
(
bwc
,
c
)
var
wrap
func
(
c
transport
.
Conn
)
transport
.
Conn
if
bwc
!=
nil
{
wrap
=
func
(
c
transport
.
Conn
)
transport
.
Conn
{
return
mconn
.
WrapConn
(
bwc
,
c
)
}
}
s
:=
&
Swarm
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help