fixed issue with improved selector change handling

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@145 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-04-14 04:32:33 +00:00
parent 8b2e942714
commit ff452a0cc4
1 changed files with 15 additions and 0 deletions

View File

@ -353,7 +353,22 @@ public abstract class SelectorManager extends AbstractLifeCycle
{
channel.register(selector,SelectionKey.OP_CONNECT,att);
}
}
else if (o instanceof SocketChannel)
{
final SocketChannel channel=(SocketChannel)o;
if (channel.isConnected())
{
SelectionKey key = channel.register(selector,SelectionKey.OP_READ,null);
SelectChannelEndPoint endpoint = newEndPoint(channel,this,key);
key.attach(endpoint);
endpoint.schedule();
}
else
{
channel.register(selector,SelectionKey.OP_CONNECT,null);
}
}
else if (o instanceof ServerSocketChannel)
{