diff options
Diffstat (limited to 'cpp/src/qpid/sys/rdma/RdmaClient.cpp')
-rw-r--r-- | cpp/src/qpid/sys/rdma/RdmaClient.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/rdma/RdmaClient.cpp b/cpp/src/qpid/sys/rdma/RdmaClient.cpp index a5f54e839d..c95cda7b37 100644 --- a/cpp/src/qpid/sys/rdma/RdmaClient.cpp +++ b/cpp/src/qpid/sys/rdma/RdmaClient.cpp @@ -65,9 +65,7 @@ Duration fullTestDuration(TIME_INFINITE); vector<char> testString; void write(Rdma::AsynchIO& aio) { - while (aio.writable()) { - if (smsgs >= target) - return; + while (aio.writable() && aio.bufferAvailable() && smsgs < target) { Rdma::Buffer* b = aio.getBuffer(); std::copy(testString.begin(), testString.end(), b->bytes); b->dataCount = msgsize; |