Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
477787c7
Commit
477787c7
authored
Dec 09, 2016
by
Jeromy Johnson
Committed by
GitHub
Dec 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3491 from ipfs/fix/swarm-peers-0-lat
swarm/peers: print 'n/a' instead of zero latency
parents
2aded678
4f78f405
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
core/commands/swarm.go
core/commands/swarm.go
+6
-1
No files found.
core/commands/swarm.go
View file @
477787c7
...
...
@@ -94,7 +94,12 @@ var swarmPeersCmd = &cmds.Command{
}
if
verbose
||
latency
{
ci
.
Latency
=
n
.
Peerstore
.
LatencyEWMA
(
pid
)
.
String
()
lat
:=
n
.
Peerstore
.
LatencyEWMA
(
pid
)
if
lat
==
0
{
ci
.
Latency
=
"n/a"
}
else
{
ci
.
Latency
=
lat
.
String
()
}
}
if
verbose
||
streams
{
strs
,
err
:=
c
.
GetStreams
()
...
...
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