diff options
Diffstat (limited to 'cpp/src/qpid/client/RdmaConnector.cpp')
| -rw-r--r-- | cpp/src/qpid/client/RdmaConnector.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index c0775ab9cd..1a85cbb4bc 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/cpp/src/qpid/client/RdmaConnector.cpp @@ -305,6 +305,7 @@ void RdmaConnector::Writer::init(std::string id, Rdma::AsynchIO* a) { Mutex::ScopedLock l(lock); identifier = id; aio = a; + assert(aio->bufferAvailable()); newBuffer(); } void RdmaConnector::Writer::handle(framing::AMQFrame& frame) { @@ -346,7 +347,7 @@ void RdmaConnector::Writer::write(Rdma::AsynchIO&) { if (lastEof==0) return; size_t bytesWritten = 0; - while (aio->writable() && !frames.empty()) { + while (aio->writable() && aio->bufferAvailable() && !frames.empty()) { const AMQFrame* frame = &frames.front(); uint32_t size = frame->size(); while (size <= encode.available()) { |
