diff --git a/pinger.go b/pinger.go index b94284f..3af3714 100644 --- a/pinger.go +++ b/pinger.go @@ -360,6 +360,7 @@ func (p *Pinger) processPacket(recv *packet, results chan *Result) error { // XXX should lock p.pending timeout, ok := p.pending[pkt.Seq] if ok { + delete(p.pending, pkt.Seq) timeout.timer.Stop() } diff --git a/pingwatch.go b/pingwatch.go index c0a5515..0b2e638 100644 --- a/pingwatch.go +++ b/pingwatch.go @@ -13,6 +13,7 @@ import ( "time" _ "github.com/mattn/go-sqlite3" + // _ "net/http/pprof" ) const date_fmt = "[02/Jan/2006:15:04:05 -0700]" diff --git a/webui.go b/webui.go index 3585a81..d782ab0 100644 --- a/webui.go +++ b/webui.go @@ -104,7 +104,9 @@ func webui_worker(db *sql.DB) { } _, ordered, points := get_data(db, since) - log.Println("found", len(ordered), "points") + if *verbose { + log.Println("found", len(ordered), "points") + } render_js_template(delta, w, r, map[string]interface{}{ "Ordered": ordered, "Points": points,