Issue #4824 - use WritePendingException instead of IOException
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
576b1e2323
commit
f788260abd
|
@ -21,6 +21,7 @@ package org.eclipse.jetty.websocket.common;
|
|||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.WritePendingException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
@ -313,7 +314,7 @@ public class WebSocketRemoteEndpoint implements RemoteEndpoint
|
|||
callback = from(callback, numOutgoingFrames::decrementAndGet);
|
||||
if (outgoingFrames > maxNumOutgoingFrames)
|
||||
{
|
||||
callback.writeFailed(new IOException("Exceeded max outgoing frames: " + outgoingFrames + ">" + maxNumOutgoingFrames));
|
||||
callback.writeFailed(new WritePendingException());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue