OioServerChannel Default Max Messages Per Read Too High
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.
This commit is contained in:
parent
4606890513
commit
8ba4b63cb6
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user