summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index c10a8791d32..8c2f50db359 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -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) {