-
-
Save gregw/020cd0ee7f448e0d651790f3c519c5d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java | |
index 20e6c2b..3ef3994 100644 | |
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java | |
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java | |
@@ -944,11 +944,41 @@ public class SslConnection extends AbstractConnection | |
getEndPoint().close(); | |
} | |
} | |
+ | |
+ Callback _nonBlockingReadCallback = new Callback.NonBlocking() | |
+ { | |
+ @Override | |
+ public void succeeded() | |
+ { | |
+ SslConnection.this.onFillable(); | |
+ } | |
+ | |
+ @Override | |
+ public void failed(final Throwable x) | |
+ { | |
+ SslConnection.this.onFillInterestedFailed(x); | |
+ } | |
+ | |
+ @Override | |
+ public String toString() | |
+ { | |
+ return String.format("SSLC.NBReadCB@%x{%s}", SslConnection.this.hashCode(),SslConnection.this); | |
+ } | |
+ }; | |
private void ensureFillInterested() | |
{ | |
if (!SslConnection.this.isFillInterested()) | |
- SslConnection.this.fillInterested(); | |
+ { | |
+ if (getFillInterest().isCallbackNonBlocking()) | |
+ { | |
+ SslConnection.this.getEndPoint().fillInterested(_nonBlockingReadCallback); | |
+ } | |
+ else | |
+ { | |
+ SslConnection.this.fillInterested(); | |
+ } | |
+ } | |
} | |
@Override |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment