socket: fix counting of socket total_bytes_read and total_bytes_write
Change-Id: If35d0dbae963facf00ab6bcf07c6e4d1706ed982 updates: bz#1666143 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
This commit is contained in:
parent
98550952be
commit
22778ca889
@ -682,8 +682,8 @@ __socket_rwv(rpc_transport_t *this, struct iovec *vector, int count,
|
||||
if (ret == 0 || (ret == -1 && errno == EAGAIN)) {
|
||||
/* done for now */
|
||||
break;
|
||||
}
|
||||
this->total_bytes_write += ret;
|
||||
} else if (ret > 0)
|
||||
this->total_bytes_write += ret;
|
||||
} else {
|
||||
ret = __socket_cached_read(this, opvector, opcount);
|
||||
if (ret == 0) {
|
||||
@ -697,8 +697,8 @@ __socket_rwv(rpc_transport_t *this, struct iovec *vector, int count,
|
||||
if (ret == -1 && errno == EAGAIN) {
|
||||
/* done for now */
|
||||
break;
|
||||
}
|
||||
this->total_bytes_read += ret;
|
||||
} else if (ret > 0)
|
||||
this->total_bytes_read += ret;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user