diff --git a/torrent.go b/torrent.go index aec85f87..481d4c34 100644 --- a/torrent.go +++ b/torrent.go @@ -711,15 +711,11 @@ func (t *Torrent) offsetRequest(off int64) (req request, ok bool) { } func (t *Torrent) writeChunk(piece int, begin int64, data []byte) (err error) { - tr := perf.NewTimer() - + defer perf.ScopeTimerErr(&err)() n, err := t.pieces[piece].Storage().WriteAt(data, begin) if err == nil && n != len(data) { err = io.ErrShortWrite } - if err == nil { - tr.Mark("write chunk") - } return }