diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java index 6755af725ec0..03923e001d4f 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ManagedSelector.java @@ -159,7 +159,7 @@ private Runnable processConnect(SelectionKey key, final Connect connect) if (connect.timeout.cancel()) { key.interestOps(0); - return new CreateEndPoint(channel, key, InvocationType.BLOCKING) + return new CreateEndPoint(channel, key) { @Override protected void failed(Throwable failure) @@ -199,19 +199,17 @@ private void closeNoExceptions(Closeable closeable) } } - private EndPoint createEndPoint(SelectableChannel channel, SelectionKey selectionKey) throws IOException + private void createEndPoint(SelectableChannel channel, SelectionKey selectionKey) throws IOException { EndPoint endPoint = _selectorManager.newEndPoint(channel, this, selectionKey); Connection connection = _selectorManager.newConnection(channel, endPoint, selectionKey.attachment()); endPoint.setConnection(connection); selectionKey.attach(endPoint); - endPoint.onOpen(); _selectorManager.endPointOpened(endPoint); _selectorManager.connectionOpened(connection); if (LOG.isDebugEnabled()) LOG.debug("Created {}", endPoint); - return endPoint; } public void destroyEndPoint(final EndPoint endPoint) @@ -595,7 +593,7 @@ public void run() try { final SelectionKey key = channel.register(_selector, 0, attachment); - submit(new CreateEndPoint(channel, key, InvocationType.NON_BLOCKING)); + submit(new CreateEndPoint(channel, key)); } catch (Throwable x) { @@ -609,13 +607,11 @@ private class CreateEndPoint implements Runnable, Invocable, Closeable { private final SelectableChannel channel; private final SelectionKey key; - private final InvocationType invocationType; - public CreateEndPoint(SelectableChannel channel, SelectionKey key, InvocationType invocationType) + public CreateEndPoint(SelectableChannel channel, SelectionKey key) { this.channel = channel; this.key = key; - this.invocationType = invocationType; } @Override @@ -632,12 +628,6 @@ public void run() } } - @Override - public InvocationType getInvocationType() - { - return invocationType; - } - @Override public void close() {