Hello.
Trustin Lee wrote:
Hi community,
Recently, I've been working on traffic throttling filters, which
prevents unwanted OutOfMemoryError due to high bandwidth asynchronous
operations, and I want to get as much feed back as possible from you.
Since you've asked :-)
I had to make a small change in the exit() method ohterwise my Connector would
not resume reading:
--- /trunk/src/org/apache/mina/filter/traffic/ReadThrottleFilter.java Tue Nov
06 12:47:18 2007
+++ /labs/src/org/apache/mina/filter/traffic/ReadThrottleFilter.java Tue Nov
06 12:49:08 2007
@@ -440,7 +440,7 @@
throw new IllegalStateException("sessionBufferSize < 0");
}
- if (state.suspendedRead &&
+ if (
(maxSessionBufferSize == 0 || sessionBufferSize <
maxSessionBufferSize) &&
(maxServiceBufferSize == 0 || serviceBufferSize <
maxServiceBufferSize) &&
(maxGlobalBufferSize == 0 || globalBufferSize <
maxGlobalBufferSize)) {
--
Luis Neves