summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/OutputInterceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/cluster/OutputInterceptor.cpp')
-rw-r--r--cpp/src/qpid/cluster/OutputInterceptor.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp
index 4424864787..e69992517c 100644
--- a/cpp/src/qpid/cluster/OutputInterceptor.cpp
+++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp
@@ -45,10 +45,12 @@ void OutputInterceptor::send(framing::AMQFrame& f) {
void OutputInterceptor::activateOutput() {
Locker l(lock);
+
if (parent.isCatchUp())
next->activateOutput();
else {
moreOutput = true;
+ QPID_LOG(trace, &parent << " activateOutput - sending doOutput");
sendDoOutput();
}
}
@@ -79,15 +81,19 @@ void OutputInterceptor::deliverDoOutput(size_t requested) {
QPID_LOG(trace, "Delivered doOutput: requested=" << requested << " output=" << sent << " more=" << moreOutput);
- if (parent.isLocal() && moreOutput)
+ if (parent.isLocal() && moreOutput) {
+ QPID_LOG(trace, &parent << " deliverDoOutput - sending doOutput, more output available.");
sendDoOutput();
+ }
else
doingOutput = false;
}
void OutputInterceptor::startDoOutput() {
- if (!doingOutput)
+ if (!doingOutput) {
+ QPID_LOG(trace, &parent << " startDoOutput - sending doOutput, more output available.");
sendDoOutput();
+ }
}
// Send a doOutput request if one is not already in flight.
@@ -111,4 +117,14 @@ void OutputInterceptor::setOutputHandler(sys::ConnectionOutputHandler& h) {
next = &h;
}
+void OutputInterceptor::close() {
+ Locker l(lock);
+ next->close();
+}
+
+size_t OutputInterceptor::getBuffered() const {
+ Locker l(lock);
+ return next->getBuffered();
+}
+
}} // namespace qpid::cluster