< prev index next >

src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLDelegate.java

Print this page

        

*** 194,204 **** * into it until handshaking completes. * * This same method is called to try and resume output after a blocking * handshaking operation has completed. */ ! private void upperWrite(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) { // currently delayCallback is not used. Use it when it's needed to execute handshake in another thread. try { ByteBuffer[] buffers = ByteBufferReference.toBuffers(refs); int bytes = Utils.remaining(buffers); while (bytes > 0) { --- 194,204 ---- * into it until handshaking completes. * * This same method is called to try and resume output after a blocking * handshaking operation has completed. */ ! private boolean upperWrite(ByteBufferReference[] refs, AsyncWriteQueue delayCallback) { // currently delayCallback is not used. Use it when it's needed to execute handshake in another thread. try { ByteBuffer[] buffers = ByteBufferReference.toBuffers(refs); int bytes = Utils.remaining(buffers); while (bytes > 0) {
*** 228,237 **** --- 228,240 ---- ByteBufferReference.clear(refs); } catch (Throwable t) { closeExceptionally(t); errorHandler.accept(t); } + // We always return true: either all the data was sent, or + // an exception happened and we have closed the queue. + return true; } // Connecting at this level means the initial handshake has completed. // This means that the initial SSL parameters are available including // ALPN result.
< prev index next >