work in progress #1281
This commit is contained in:
parent
861432a334
commit
3c2ff283a2
|
@ -388,9 +388,13 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
SelectableChannel channel = null;
|
||||
try
|
||||
{
|
||||
channel = _selectorManager.doAccept(server);
|
||||
if (channel!=null)
|
||||
while(true)
|
||||
{
|
||||
channel = _selectorManager.doAccept(server);
|
||||
if (channel==null)
|
||||
break;
|
||||
_selectorManager.accepted(channel);
|
||||
}
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
|
@ -534,7 +538,7 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
{
|
||||
try
|
||||
{
|
||||
SelectionKey key = _channel.register(_selector, SelectionKey.OP_ACCEPT, null);
|
||||
SelectionKey key = _channel.register(_selector, SelectionKey.OP_ACCEPT, "Acceptor");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} acceptor={}", this, key);
|
||||
}
|
||||
|
|
|
@ -240,10 +240,13 @@ public class UnixSocketConnector extends AbstractConnector
|
|||
{
|
||||
if (_acceptChannel == null)
|
||||
{
|
||||
File file = new File(_unixSocket);
|
||||
file.deleteOnExit();
|
||||
SocketAddress bindAddress = new UnixSocketAddress(file);
|
||||
UnixServerSocketChannel serverChannel = UnixServerSocketChannel.open();
|
||||
SocketAddress bindAddress = new UnixSocketAddress(new File(_unixSocket));
|
||||
serverChannel.socket().bind(bindAddress, getAcceptQueueSize());
|
||||
|
||||
serverChannel.configureBlocking(getAcceptors()>0);
|
||||
serverChannel.socket().bind(bindAddress, getAcceptQueueSize());
|
||||
addBean(serverChannel);
|
||||
|
||||
LOG.debug("opened {}",serverChannel);
|
||||
|
@ -287,7 +290,7 @@ public class UnixSocketConnector extends AbstractConnector
|
|||
@Override
|
||||
public void accept(int acceptorID) throws IOException
|
||||
{
|
||||
LOG.warn("Blocking UnixSocket accept used. Cannot be interrupted!");
|
||||
LOG.debug("Blocking UnixSocket accept used. Might not be able to be interrupted!");
|
||||
UnixServerSocketChannel serverChannel = _acceptChannel;
|
||||
if (serverChannel != null && serverChannel.isOpen())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue