client.go | 2 ++ diff --git a/client.go b/client.go index 7a11c24a79371eb18a7f9a0295baf0f220f02643..2a20b263385c0b802bd7b26e3708f45b8b777581 100644 --- a/client.go +++ b/client.go @@ -49,6 +49,7 @@ peersFoundByDHT = expvar.NewInt("peersFoundByDHT") peersFoundByPEX = expvar.NewInt("peersFoundByPEX") uploadChunksPosted = expvar.NewInt("uploadChunksPosted") unexpectedCancels = expvar.NewInt("unexpectedCancels") + postedCancels = expvar.NewInt("postedCancels") ) const extensionBytes = "\x00\x00\x00\x00\x00\x10\x00\x00" @@ -541,6 +542,7 @@ func (cl *Client) connCancel(t *torrent, cn *connection, r request) (ok bool) { ok = cn.Cancel(r) if ok { + postedCancels.Add(1) cl.downloadStrategy.DeleteRequest(t, r) } return