Skip to content

Commit

Permalink
OioServerChannel Default Max Messages Per Read Too High
Browse files Browse the repository at this point in the history
Motivation:
A few implementations of OioServerChannel have a default max messages per read set to 16. We should set the default to 1 to prevent blocking on a read before setting a socket that has just been accepted.

Modifications:
- OioSctpServerChannel and OioServerSocketChannel metadata changed to use the default (1) max messages per read

Result:
Oio based servers will complete accepting a socket before potentially blocking waiting to accept other sockets.
  • Loading branch information
Scottmitch committed Jan 29, 2016
1 parent 4606890 commit 8ba4b63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class OioSctpServerChannel extends AbstractOioMessageChannel
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(OioSctpServerChannel.class);

private static final ChannelMetadata METADATA = new ChannelMetadata(false, 16);
private static final ChannelMetadata METADATA = new ChannelMetadata(false, 1);

private static SctpServerChannel newServerSocket() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class OioServerSocketChannel extends AbstractOioMessageChannel
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(OioServerSocketChannel.class);

private static final ChannelMetadata METADATA = new ChannelMetadata(false, 16);
private static final ChannelMetadata METADATA = new ChannelMetadata(false, 1);

private static ServerSocket newServerSocket() {
try {
Expand Down

0 comments on commit 8ba4b63

Please sign in to comment.