Skip to content

Commit

Permalink
Issue #4824 - use WritePendingException instead of IOException
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Sep 3, 2020
1 parent 576b1e2 commit f788260
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -21,6 +21,7 @@
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;
Expand Down Expand Up @@ -313,7 +314,7 @@ public void uncheckedSendFrame(WebSocketFrame frame, WriteCallback callback)
callback = from(callback, numOutgoingFrames::decrementAndGet);
if (outgoingFrames > maxNumOutgoingFrames)
{
callback.writeFailed(new IOException("Exceeded max outgoing frames: " + outgoingFrames + ">" + maxNumOutgoingFrames));
callback.writeFailed(new WritePendingException());
return;
}
}
Expand Down

0 comments on commit f788260

Please sign in to comment.