Keep sending StartBackPressure message under pressure
diff --git a/heron/common/src/cpp/network/connection.cpp b/heron/common/src/cpp/network/connection.cpp
index b8d1bf2..5b241e8 100644
--- a/heron/common/src/cpp/network/connection.cpp
+++ b/heron/common/src/cpp/network/connection.cpp
@@ -90,19 +90,17 @@
mOnConnectionBufferChange(this);
}
- if (!hasCausedBackPressure()) {
- // Are we above the threshold?
- if (mNumOutstandingBytes >= systemHWMOutstandingBytes) {
- // Have we been above the threshold enough number of times?
- if (++mNumEnqueuesWithBufferFull > __SYSTEM_MIN_NUM_ENQUEUES_WITH_BUFFER_FULL__) {
- mNumEnqueuesWithBufferFull = 0;
- if (mOnConnectionBufferFull) {
- mOnConnectionBufferFull(this);
- }
- }
- } else {
+ // Are we above the threshold?
+ if (mNumOutstandingBytes >= systemHWMOutstandingBytes) {
+ // Have we been above the threshold enough number of times?
+ if (++mNumEnqueuesWithBufferFull > __SYSTEM_MIN_NUM_ENQUEUES_WITH_BUFFER_FULL__) {
mNumEnqueuesWithBufferFull = 0;
+ if (mOnConnectionBufferFull) {
+ mOnConnectionBufferFull(this);
+ }
}
+ } else {
+ mNumEnqueuesWithBufferFull = 0;
}
return 0;
}