Commit 477aee88 authored by Tom Evans's avatar Tom Evans

OF-903: Simplify backup packet delivery

Original issue (OF-857) has been addressed by providing an alternate
packet deliverer (to offline storage). This additional logic was an
ill-advised "belt-and-suspenders" attempt to prevent the recursion which
was occurring before the backup deliverer was implemented.
parent 5e3f4161
...@@ -312,15 +312,7 @@ public class NIOConnection implements Connection { ...@@ -312,15 +312,7 @@ public class NIOConnection implements Connection {
public void deliver(Packet packet) throws UnauthorizedException { public void deliver(Packet packet) throws UnauthorizedException {
if (state != State.RUNNING) { if (state != State.RUNNING) {
// OF-857: Do not allow the backup deliverer to recurse backupDeliverer.deliver(packet);
if (backupDeliverer == null) {
Log.error("Failed to deliver packet: " + packet.toXML());
throw new IllegalStateException("Connection closed");
}
// attempt to deliver via backup only once
PacketDeliverer backup = backupDeliverer;
backupDeliverer = null;
backup.deliver(packet);
} }
else { else {
boolean errorDelivering = false; boolean errorDelivering = false;
......
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