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-unixfs
Commits
77cec590
Commit
77cec590
authored
Oct 10, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actually put diagCmd into the super command so it can be run
parent
d5f0476c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
cmd/ipfs/ipfs.go
cmd/ipfs/ipfs.go
+1
-0
peer/peer.go
peer/peer.go
+5
-1
No files found.
cmd/ipfs/ipfs.go
View file @
77cec590
...
...
@@ -59,6 +59,7 @@ Use "ipfs help <command>" for more information about a command.
cmdIpfsRun
,
cmdIpfsName
,
cmdIpfsBootstrap
,
cmdIpfsDiag
,
},
Flag
:
*
flag
.
NewFlagSet
(
"ipfs"
,
flag
.
ExitOnError
),
}
...
...
peer/peer.go
View file @
77cec590
...
...
@@ -105,6 +105,10 @@ func (p *Peer) GetLatency() (out time.Duration) {
// Yep, should be EWMA or something. (-jbenet)
func
(
p
*
Peer
)
SetLatency
(
laten
time
.
Duration
)
{
p
.
Lock
()
p
.
latency
=
laten
if
p
.
latency
==
0
{
p
.
latency
=
laten
}
else
{
p
.
latency
=
((
p
.
latency
*
9
)
+
laten
)
/
10
}
p
.
Unlock
()
}
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