Skip to content

Commit

Permalink
Bug fix: corrected exception type thrown in case of unexpected connec…
Browse files Browse the repository at this point in the history
…tion termination
  • Loading branch information
ok2c committed Jun 2, 2024
1 parent 1255be4 commit 939d4b2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.WritableByteChannel;
Expand Down Expand Up @@ -498,7 +497,7 @@ int streamOutput(final ByteBuffer src) throws IOException {
ioSession.getLock().lock();
try {
if (outgoingMessage == null) {
throw new ClosedChannelException();
throw new ConnectionClosedException();
}
final ContentEncoder contentEncoder = outgoingMessage.getBody();
final int bytesWritten = contentEncoder.write(src);
Expand Down

0 comments on commit 939d4b2

Please sign in to comment.