diff --git a/src/ubsocket/brpc/brpc_file_descriptor.h b/src/ubsocket/brpc/brpc_file_descriptor.h index 9490af9b455a6efa7ab51c7c4c0ec76778345cca..a53a1b9f6c2b195cb0b8d51a3bd21ee30c1a20f5 100644 --- a/src/ubsocket/brpc/brpc_file_descriptor.h +++ b/src/ubsocket/brpc/brpc_file_descriptor.h @@ -1333,7 +1333,6 @@ private: if (IsTimeout(start, timeout_ms)) { /* If a timeout is triggered here, it would indicate a memory leak. * In this case, processing of unsignaled wr should not continue. */ - err_code = SocketFd::FATAL_ERROR; RPC_ADPT_VLOG_DEBUG("Flush TX operation exceeded timeout period(%u ms)\n", timeout_ms); break; } @@ -1370,9 +1369,10 @@ private: /* WriteV ensure total_data_size equals to the sum of all data_size, thus, do not consider * the situation that rest_size would not reduced to zero */ while (cur_qbuf && rest_size > 0) { - rest_size -= (int64_t)cur_qbuf->data_size; - last_qbuf = cur_qbuf; - cur_qbuf = QBUF_LIST_NEXT(cur_qbuf); + rest_size -= (int64_t)cur_qbuf->data_size; + last_qbuf = cur_qbuf; + ((Brpc::IOBuf::Block *)PtrFloorToBoundary(cur_qbuf->buf_data))->DecRef(); + cur_qbuf = QBUF_LIST_NEXT(cur_qbuf); } cached_wr_cnt++;