Commit 7d7d3fd0 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-894: Do not attempt to close a session that is already closing.

parent 6716afbf
......@@ -47,6 +47,7 @@ public class StalledSessionsFilter extends IoFilterAdapter {
@Override
public void filterWrite(NextFilter nextFilter, IoSession session, WriteRequest writeRequest)
throws Exception {
if (!session.isClosing()) {
// Get number of pending requests
long pendingBytes = session.getScheduledWriteBytes();
if (pendingBytes > bytesCap) {
......@@ -59,6 +60,7 @@ public class StalledSessionsFilter extends IoFilterAdapter {
session.close(false);
throw new IOException("Closing session that seems to be stalled. Preventing OOM");
}
}
// Call next filter (everything is fine)
super.filterWrite(nextFilter, session, writeRequest);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment