fix: tcpTracker's upload
This commit is contained in:
parent
ba6163574e
commit
fa5b5ca02d
1 changed files with 1 additions and 4 deletions
|
@ -65,11 +65,8 @@ func (tt *tcpTracker) Write(b []byte) (int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tt *tcpTracker) WriteBuffer(buffer *buf.Buffer) (err error) {
|
func (tt *tcpTracker) WriteBuffer(buffer *buf.Buffer) (err error) {
|
||||||
|
upload := int64(buffer.Len())
|
||||||
err = tt.extendedWriter.WriteBuffer(buffer)
|
err = tt.extendedWriter.WriteBuffer(buffer)
|
||||||
var upload int64
|
|
||||||
if err != nil {
|
|
||||||
upload = int64(buffer.Len())
|
|
||||||
}
|
|
||||||
tt.manager.PushUploaded(upload)
|
tt.manager.PushUploaded(upload)
|
||||||
tt.UploadTotal.Add(upload)
|
tt.UploadTotal.Add(upload)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue