Commit 77cec590 authored by Jeromy's avatar Jeromy

actually put diagCmd into the super command so it can be run

parent d5f0476c
......@@ -59,6 +59,7 @@ Use "ipfs help <command>" for more information about a command.
cmdIpfsRun,
cmdIpfsName,
cmdIpfsBootstrap,
cmdIpfsDiag,
},
Flag: *flag.NewFlagSet("ipfs", flag.ExitOnError),
}
......
......@@ -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()
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment