summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-01-11 15:29:05 +0000
committerGordon Sim <gsim@apache.org>2008-01-11 15:29:05 +0000
commit6cc910cde9a5923f9cea6571e33ad20fa758929a (patch)
treea71faee46b1ed9854ce5510a26056809d8533970 /cpp
parent40dc8f14abdd4669360d52fbd515a65f12364ec4 (diff)
downloadqpid-python-6cc910cde9a5923f9cea6571e33ad20fa758929a.tar.gz
Allow more than one message to be encoded into a single buffer if available.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@611205 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/sys/AsynchIOAcceptor.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
index c2c4b545f9..dd8fe957bd 100644
--- a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
+++ b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
@@ -304,8 +304,18 @@ void AsynchIOHandler::idle(AsynchIO&){
buffUsed += frameSize;
QPID_LOG(trace, "SENT [" << identifier << "]: " << frame);
- if (frameQueue.empty())
- break;
+ if (frameQueue.empty()) {
+ //if we have run out of frames, allow upper layers to
+ //generate more
+ if (!frameQueueClosed) {
+ inputHandler->doOutput();
+ }
+ if (frameQueue.empty()) {
+ //if there are still no frames, we have no more to
+ //do
+ break;
+ }
+ }
frame = frameQueue.front();
frameSize = frame.size();
}