Attempting to come to terms with EofException condition
This commit is contained in:
parent
57f16d750d
commit
65cb453080
|
@ -43,7 +43,11 @@ public class ControlFrameBytes<C> extends FrameBytes<C>
|
|||
if (frame.getOpCode() == OpCode.CLOSE)
|
||||
{
|
||||
// Disconnect the connection (no more packets/frames)
|
||||
connection.disconnect(true); // FIXME (should only shutdown output here)
|
||||
connection.disconnect(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
connection.flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ public class DataFrameBytes<C> extends FrameBytes<C>
|
|||
{
|
||||
super.completed(context);
|
||||
}
|
||||
connection.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.nio.ByteBuffer;
|
|||
import java.nio.channels.InterruptedByTimeoutException;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.eclipse.jetty.io.EofException;
|
||||
import org.eclipse.jetty.util.Callback;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -67,7 +68,15 @@ public abstract class FrameBytes<C> implements Callback<C>, Runnable
|
|||
@Override
|
||||
public void failed(C context, Throwable x)
|
||||
{
|
||||
LOG.warn("failed(" + context + ")",x);
|
||||
if (x instanceof EofException)
|
||||
{
|
||||
// Abbreviate the EofException
|
||||
LOG.warn("failed(" + context + ") - " + EofException.class);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.warn("failed(" + context + ")",x);
|
||||
}
|
||||
cancelTask();
|
||||
callback.failed(context,x);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ public abstract class WebSocketAsyncConnection extends AbstractAsyncConnection i
|
|||
}
|
||||
flushing = false;
|
||||
}
|
||||
flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue