svn commit: r1799276 - in /tomcat/tc8.5.x/trunk: java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ webapps/docs/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1799276 - in /tomcat/tc8.5.x/trunk: java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ webapps/docs/

markt
Author: markt
Date: Mon Jun 19 20:22:27 2017
New Revision: 1799276

URL: http://svn.apache.org/viewvc?rev=1799276&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61195
Backport, with deprecation where appropriate, the endpoint and protocol property changes from 9.0.x to ease migration from 8.5.x to 9.0.x.

Modified:
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11InputBuffer.java
    tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
    tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/AbstractProtocol.java Mon Jun 19 20:22:27 2017
@@ -274,7 +274,11 @@ public abstract class AbstractProtocol<S
     }
 
 
+    public int getAcceptCount() { return endpoint.getAcceptCount(); }
+    public void setAcceptCount(int acceptCount) { endpoint.setAcceptCount(acceptCount); }
+    @Deprecated
     public int getBacklog() { return endpoint.getBacklog(); }
+    @Deprecated
     public void setBacklog(int backlog) { endpoint.setBacklog(backlog); }
 
 
@@ -284,7 +288,13 @@ public abstract class AbstractProtocol<S
     }
 
 
+    public int getConnectionLinger() { return endpoint.getConnectionLinger(); }
+    public void setConnectionLinger(int connectionLinger) {
+        endpoint.setConnectionLinger(connectionLinger);
+    }
+    @Deprecated
     public int getSoLinger() { return endpoint.getSoLinger(); }
+    @Deprecated
     public void setSoLinger(int soLinger) { endpoint.setSoLinger(soLinger); }
 
 
@@ -312,20 +322,17 @@ public abstract class AbstractProtocol<S
      * wait for that data to arrive before closing the connection.
      */
     public int getConnectionTimeout() {
-        // Note that the endpoint uses the alternative name
-        return endpoint.getSoTimeout();
+        return endpoint.getConnectionTimeout();
     }
     public void setConnectionTimeout(int timeout) {
-        // Note that the endpoint uses the alternative name
-        endpoint.setSoTimeout(timeout);
+        endpoint.setConnectionTimeout(timeout);
     }
 
-    /*
-     * Alternative name for connectionTimeout property
-     */
+    @Deprecated
     public int getSoTimeout() {
         return getConnectionTimeout();
     }
+    @Deprecated
     public void setSoTimeout(int timeout) {
         setConnectionTimeout(timeout);
     }

Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java Mon Jun 19 20:22:27 2017
@@ -43,7 +43,7 @@ public abstract class AbstractAjpProtoco
 
     public AbstractAjpProtocol(AbstractEndpoint<S> endpoint) {
         super(endpoint);
-        setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
+        setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
         // AJP does not use Send File
         getEndpoint().setUseSendfile(false);
         ConnectionHandler<S> cHandler = new ConnectionHandler<>(this);

Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Mon Jun 19 20:22:27 2017
@@ -400,7 +400,7 @@ public class AjpProcessor extends Abstra
         // Setting up the socket
         this.socketWrapper = socket;
 
-        int soTimeout = endpoint.getSoTimeout();
+        int soTimeout = endpoint.getConnectionTimeout();
         boolean cping = false;
 
         boolean keptAlive = false;

Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java Mon Jun 19 20:22:27 2017
@@ -50,7 +50,7 @@ public abstract class AbstractHttp11Prot
 
     public AbstractHttp11Protocol(AbstractEndpoint<S> endpoint) {
         super(endpoint);
-        setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
+        setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
         ConnectionHandler<S> cHandler = new ConnectionHandler<>(this);
         setHandler(cHandler);
         getEndpoint().setHandler(cHandler);

Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11InputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11InputBuffer.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11InputBuffer.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11InputBuffer.java Mon Jun 19 20:22:27 2017
@@ -366,7 +366,7 @@ public class Http11InputBuffer implement
                     }
                     // At least one byte of the request has been received.
                     // Switch to the socket timeout.
-                    wrapper.setReadTimeout(wrapper.getEndpoint().getSoTimeout());
+                    wrapper.setReadTimeout(wrapper.getEndpoint().getConnectionTimeout());
                 }
                 if (!keptAlive && byteBuffer.position() == 0 && byteBuffer.limit() >= CLIENT_PREFACE_START.length - 1) {
                     boolean prefaceMatch = true;

Modified: tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Jun 19 20:22:27 2017
@@ -855,7 +855,7 @@ public class Http11Processor extends Abs
             }
 
             if (!disableUploadTimeout) {
-                int soTimeout = endpoint.getSoTimeout();
+                int soTimeout = endpoint.getConnectionTimeout();
                 if(soTimeout > 0) {
                     socketWrapper.setReadTimeout(soTimeout);
                 } else {

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Mon Jun 19 20:22:27 2017
@@ -422,9 +422,13 @@ public abstract class AbstractEndpoint<S
      * should be used for server sockets. By default, this value
      * is 100.
      */
-    private int backlog = 100;
-    public void setBacklog(int backlog) { if (backlog > 0) this.backlog = backlog; }
-    public int getBacklog() { return backlog; }
+    private int acceptCount = 100;
+    public void setAcceptCount(int acceptCount) { if (acceptCount > 0) this.acceptCount = acceptCount; }
+    public int getAcceptCount() { return acceptCount; }
+    @Deprecated
+    public void setBacklog(int backlog) { setAcceptCount(backlog); }
+    @Deprecated
+    public int getBacklog() { return getAcceptCount(); }
 
     /**
      * Controls when the Endpoint binds the port. <code>true</code>, the default
@@ -469,11 +473,15 @@ public abstract class AbstractEndpoint<S
      * @return The current socket linger time for sockets created by this
      *         endpoint
      */
-    public int getSoLinger() { return socketProperties.getSoLingerTime(); }
-    public void setSoLinger(int soLinger) {
-        socketProperties.setSoLingerTime(soLinger);
-        socketProperties.setSoLingerOn(soLinger>=0);
+    public int getConnectionLinger() { return socketProperties.getSoLingerTime(); }
+    public void setConnectionLinger(int connectionLinger) {
+        socketProperties.setSoLingerTime(connectionLinger);
+        socketProperties.setSoLingerOn(connectionLinger>=0);
     }
+    @Deprecated
+    public int getSoLinger() { return getConnectionLinger(); }
+    @Deprecated
+    public void setSoLinger(int soLinger) { setConnectionLinger(soLinger);}
 
 
     /**
@@ -481,8 +489,12 @@ public abstract class AbstractEndpoint<S
      *
      * @return The current socket timeout for sockets created by this endpoint
      */
-    public int getSoTimeout() { return socketProperties.getSoTimeout(); }
-    public void setSoTimeout(int soTimeout) { socketProperties.setSoTimeout(soTimeout); }
+    public int getConnectionTimeout() { return socketProperties.getSoTimeout(); }
+    public void setConnectionTimeout(int soTimeout) { socketProperties.setSoTimeout(soTimeout); }
+    @Deprecated
+    public int getSoTimeout() { return getConnectionTimeout(); }
+    @Deprecated
+    public void setSoTimeout(int soTimeout) { setConnectionTimeout(soTimeout); }
 
     /**
      * SSL engine.

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Mon Jun 19 20:22:27 2017
@@ -335,7 +335,7 @@ public class AprEndpoint extends Abstrac
             throw new Exception(sm.getString("endpoint.init.bind", "" + ret, Error.strerror(ret)));
         }
         // Start listening on the server socket
-        ret = Socket.listen(serverSock, getBacklog());
+        ret = Socket.listen(serverSock, getAcceptCount());
         if (ret != 0) {
             throw new Exception(sm.getString("endpoint.init.listen", "" + ret, Error.strerror(ret)));
         }
@@ -835,8 +835,8 @@ public class AprEndpoint extends Abstrac
                 AprSocketWrapper wrapper = new AprSocketWrapper(Long.valueOf(socket), this);
                 wrapper.setKeepAliveLeft(getMaxKeepAliveRequests());
                 wrapper.setSecure(isSSLEnabled());
-                wrapper.setReadTimeout(getSoTimeout());
-                wrapper.setWriteTimeout(getSoTimeout());
+                wrapper.setReadTimeout(getConnectionTimeout());
+                wrapper.setWriteTimeout(getConnectionTimeout());
                 connections.put(Long.valueOf(socket), wrapper);
                 getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
             }
@@ -1564,7 +1564,7 @@ public class AprEndpoint extends Abstrac
                 while (pollerRunning && connectionCount.get() < 1 &&
                         addList.size() < 1 && closeList.size() < 1) {
                     try {
-                        if (getSoTimeout() > 0 && pollerRunning) {
+                        if (getConnectionTimeout() > 0 && pollerRunning) {
                             maintain();
                         }
                         synchronized (this) {
@@ -1837,7 +1837,7 @@ public class AprEndpoint extends Abstrac
                 }
                 try {
                     // Process socket timeouts
-                    if (getSoTimeout() > 0 && pollerRunning) {
+                    if (getConnectionTimeout() > 0 && pollerRunning) {
                         // This works and uses only one timeout mechanism for everything, but the
                         // non event poller might be a bit faster by using the old maintain.
                         maintain();
@@ -1933,14 +1933,14 @@ public class AprEndpoint extends Abstrac
             if (size <= 0) {
                 size = (OS.IS_WIN32 || OS.IS_WIN64) ? (1 * 1024) : (16 * 1024);
             }
-            sendfilePollset = allocatePoller(size, pool, getSoTimeout());
+            sendfilePollset = allocatePoller(size, pool, getConnectionTimeout());
             if (sendfilePollset == 0 && size > 1024) {
                 size = 1024;
-                sendfilePollset = allocatePoller(size, pool, getSoTimeout());
+                sendfilePollset = allocatePoller(size, pool, getConnectionTimeout());
             }
             if (sendfilePollset == 0) {
                 size = 62;
-                sendfilePollset = allocatePoller(size, pool, getSoTimeout());
+                sendfilePollset = allocatePoller(size, pool, getConnectionTimeout());
             }
             desc = new long[size * 2];
             sendfileData = new HashMap<>(size);
@@ -2018,7 +2018,7 @@ public class AprEndpoint extends Abstrac
                             // Entire file has been sent
                             Pool.destroy(data.fdpool);
                             // Set back socket to blocking mode
-                            Socket.timeoutSet(data.socket, getSoTimeout() * 1000);
+                            Socket.timeoutSet(data.socket, getConnectionTimeout() * 1000);
                             return SendfileState.DONE;
                         }
                     }
@@ -2154,7 +2154,7 @@ public class AprEndpoint extends Abstrac
                                 case PIPELINED: {
                                     // Destroy file descriptor pool, which should close the file
                                     Pool.destroy(state.fdpool);
-                                    Socket.timeoutSet(state.socket, getSoTimeout() * 1000);
+                                    Socket.timeoutSet(state.socket, getConnectionTimeout() * 1000);
                                     // Process the pipelined request data
                                     if (!processSocket(state.socket, SocketEvent.OPEN_READ)) {
                                         closeSocket(state.socket);
@@ -2164,7 +2164,7 @@ public class AprEndpoint extends Abstrac
                                 case OPEN: {
                                     // Destroy file descriptor pool, which should close the file
                                     Pool.destroy(state.fdpool);
-                                    Socket.timeoutSet(state.socket, getSoTimeout() * 1000);
+                                    Socket.timeoutSet(state.socket, getConnectionTimeout() * 1000);
                                     // Put the socket back in the poller for
                                     // processing of further requests
                                     getPoller().add(state.socket, getKeepAliveTimeout(),
@@ -2194,7 +2194,7 @@ public class AprEndpoint extends Abstrac
                         }
                     }
                     // Call maintain for the sendfile poller
-                    if (getSoTimeout() > 0 &&
+                    if (getConnectionTimeout() > 0 &&
                             maintainTime > 1000000L && sendfileRunning) {
                         rv = Poll.maintain(sendfilePollset, desc, false);
                         maintainTime = 0;
@@ -2250,7 +2250,7 @@ public class AprEndpoint extends Abstrac
                 if (!deferAccept) {
                     if (setSocketOptions(socket)) {
                         getPoller().add(socket.getSocket().longValue(),
-                                getSoTimeout(), Poll.APR_POLLIN);
+                                getConnectionTimeout(), Poll.APR_POLLIN);
                     } else {
                         // Close socket and pool
                         closeSocket(socket.getSocket().longValue());

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Mon Jun 19 20:22:27 2017
@@ -151,7 +151,7 @@ public class Nio2Endpoint extends Abstra
         serverSock = AsynchronousServerSocketChannel.open(threadGroup);
         socketProperties.setProperties(serverSock);
         InetSocketAddress addr = (getAddress()!=null?new InetSocketAddress(getAddress(),getPort()):new InetSocketAddress(getPort()));
-        serverSock.bind(addr,getBacklog());
+        serverSock.bind(addr,getAcceptCount());
 
         // Initialize thread count defaults for acceptor, poller
         if (acceptorThreadCount != 1) {
@@ -319,8 +319,8 @@ public class Nio2Endpoint extends Abstra
             socketWrapper.setWriteTimeout(getSocketProperties().getSoTimeout());
             socketWrapper.setKeepAliveLeft(Nio2Endpoint.this.getMaxKeepAliveRequests());
             socketWrapper.setSecure(isSSLEnabled());
-            socketWrapper.setReadTimeout(getSoTimeout());
-            socketWrapper.setWriteTimeout(getSoTimeout());
+            socketWrapper.setReadTimeout(getConnectionTimeout());
+            socketWrapper.setWriteTimeout(getConnectionTimeout());
             // Continue processing on another thread
             return processSocket(socketWrapper, SocketEvent.OPEN_READ, true);
         } catch (Throwable t) {

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Mon Jun 19 20:22:27 2017
@@ -207,7 +207,7 @@ public class NioEndpoint extends Abstrac
         serverSock = ServerSocketChannel.open();
         socketProperties.setProperties(serverSock.socket());
         InetSocketAddress addr = (getAddress()!=null?new InetSocketAddress(getAddress(),getPort()):new InetSocketAddress(getPort()));
-        serverSock.socket().bind(addr,getBacklog());
+        serverSock.socket().bind(addr,getAcceptCount());
         serverSock.configureBlocking(true); //mimic APR behavior
 
         // Initialize thread count defaults for acceptor, poller
@@ -704,8 +704,8 @@ public class NioEndpoint extends Abstrac
             ka.setWriteTimeout(getSocketProperties().getSoTimeout());
             ka.setKeepAliveLeft(NioEndpoint.this.getMaxKeepAliveRequests());
             ka.setSecure(isSSLEnabled());
-            ka.setReadTimeout(getSoTimeout());
-            ka.setWriteTimeout(getSoTimeout());
+            ka.setReadTimeout(getConnectionTimeout());
+            ka.setWriteTimeout(getConnectionTimeout());
             PollerEvent r = eventCache.pop();
             ka.interestOps(SelectionKey.OP_READ);//this is what OP_REGISTER turns into.
             if ( r==null) r = new PollerEvent(socket,ka,OP_REGISTER);
@@ -1381,7 +1381,7 @@ public class NioEndpoint extends Abstrac
                 // Need to re-negotiate SSL connection
                 engine.setNeedClientAuth(true);
                 try {
-                    sslChannel.rehandshake(getEndpoint().getSoTimeout());
+                    sslChannel.rehandshake(getEndpoint().getConnectionTimeout());
                     ((JSSESupport) sslSupport).setSession(engine.getSession());
                 } catch (IOException ioe) {
                     log.warn(sm.getString("socket.sslreneg",ioe));

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java Mon Jun 19 20:22:27 2017
@@ -240,7 +240,7 @@ public class SecureNio2Channel extends N
                             sc.write(netOutBuffer, socket, handshakeWriteCompletionHandler);
                         } else {
                             try {
-                                sc.write(netOutBuffer).get(endpoint.getSoTimeout(), TimeUnit.MILLISECONDS);
+                                sc.write(netOutBuffer).get(endpoint.getConnectionTimeout(), TimeUnit.MILLISECONDS);
                             } catch (InterruptedException | ExecutionException | TimeoutException e) {
                                 throw new IOException(sm.getString("channel.nio.ssl.handshakeError"));
                             }
@@ -273,7 +273,7 @@ public class SecureNio2Channel extends N
                             sc.write(netOutBuffer, socket, handshakeWriteCompletionHandler);
                         } else {
                             try {
-                                sc.write(netOutBuffer).get(endpoint.getSoTimeout(), TimeUnit.MILLISECONDS);
+                                sc.write(netOutBuffer).get(endpoint.getConnectionTimeout(), TimeUnit.MILLISECONDS);
                             } catch (InterruptedException | ExecutionException | TimeoutException e) {
                                 throw new IOException(sm.getString("channel.nio.ssl.handshakeError"));
                             }
@@ -296,7 +296,7 @@ public class SecureNio2Channel extends N
                             sc.read(netInBuffer, socket, handshakeReadCompletionHandler);
                         } else {
                             try {
-                                sc.read(netInBuffer).get(endpoint.getSoTimeout(), TimeUnit.MILLISECONDS);
+                                sc.read(netInBuffer).get(endpoint.getConnectionTimeout(), TimeUnit.MILLISECONDS);
                             } catch (InterruptedException | ExecutionException | TimeoutException e) {
                                 throw new IOException(sm.getString("channel.nio.ssl.handshakeError"));
                             }
@@ -527,7 +527,7 @@ public class SecureNio2Channel extends N
         sslEngine.closeOutbound();
 
         try {
-            if (!flush().get(endpoint.getSoTimeout(), TimeUnit.MILLISECONDS).booleanValue()) {
+            if (!flush().get(endpoint.getConnectionTimeout(), TimeUnit.MILLISECONDS).booleanValue()) {
                 throw new IOException(sm.getString("channel.nio.ssl.remainingDataDuringClose"));
             }
         } catch (InterruptedException | ExecutionException | TimeoutException e) {
@@ -547,7 +547,7 @@ public class SecureNio2Channel extends N
         netOutBuffer.flip();
         //if there is data to be written
         try {
-            if (!flush().get(endpoint.getSoTimeout(), TimeUnit.MILLISECONDS).booleanValue()) {
+            if (!flush().get(endpoint.getConnectionTimeout(), TimeUnit.MILLISECONDS).booleanValue()) {
                 throw new IOException(sm.getString("channel.nio.ssl.remainingDataDuringClose"));
             }
         } catch (InterruptedException | ExecutionException | TimeoutException e) {

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1799276&r1=1799275&r2=1799276&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Mon Jun 19 20:22:27 2017
@@ -143,6 +143,11 @@
         engine so that a concurrent destruction cannot cause a JVM crash.
         (remm)
       </fix>
+      <fix>
+        <bug>61195</bug>: Backport, with deprecation where appropriate, the
+        endpoint and protocol property changes from 9.0.x to ease migration from
+        8.5.x to 9.0.x. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]