Commit e9a6eb55 authored by daryl herzmann's avatar daryl herzmann

Merge pull request #561 from akrherz/of829

OF-929 prevent ghosts by removing ioSession check
parents ca122761 e5182f23
...@@ -295,10 +295,6 @@ public class NIOConnection implements Connection { ...@@ -295,10 +295,6 @@ public class NIOConnection implements Connection {
IoBuffer buffer = IoBuffer.allocate(4096); IoBuffer buffer = IoBuffer.allocate(4096);
buffer.setAutoExpand(true); buffer.setAutoExpand(true);
try { try {
// OF-464: if the connection has been dropped, fail over to backupDeliverer (offline)
if (!ioSession.isConnected()) {
throw new IOException("Connection reset/closed by peer");
}
buffer.putString(packet.getElement().asXML(), encoder.get()); buffer.putString(packet.getElement().asXML(), encoder.get());
if (flashClient) { if (flashClient) {
buffer.put((byte) '\0'); buffer.put((byte) '\0');
...@@ -344,10 +340,6 @@ public class NIOConnection implements Connection { ...@@ -344,10 +340,6 @@ public class NIOConnection implements Connection {
buffer.flip(); buffer.flip();
ioSessionLock.lock(); ioSessionLock.lock();
try { try {
// OF-464: handle dropped connections (no backupDeliverer in this case?)
if (!ioSession.isConnected()) {
throw new IOException("Connection reset/closed by peer");
}
ioSession.write(buffer); ioSession.write(buffer);
} }
finally { finally {
......
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