You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2019/07/19 08:21:07 UTC
[tomcat] branch master updated: 63568: Avoid error when trying to
set tcpNoDelay
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new ab583fa 63568: Avoid error when trying to set tcpNoDelay
ab583fa is described below
commit ab583fac4efa3dd1edc36b1f9b42dbc2f5f314bf
Author: remm <re...@apache.org>
AuthorDate: Fri Jul 19 10:20:55 2019 +0200
63568: Avoid error when trying to set tcpNoDelay
This can occur on socket types that do not support it, for example when
using the NIO inherited channel capability.
Submitted by František Kučera.
---
java/org/apache/tomcat/util/net/SocketProperties.java | 9 +++++++--
webapps/docs/changelog.xml | 5 +++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/SocketProperties.java b/java/org/apache/tomcat/util/net/SocketProperties.java
index a5573b0..706cc5e 100644
--- a/java/org/apache/tomcat/util/net/SocketProperties.java
+++ b/java/org/apache/tomcat/util/net/SocketProperties.java
@@ -200,8 +200,13 @@ public class SocketProperties {
soLingerTime.intValue());
if (soTimeout != null && soTimeout.intValue() >= 0)
socket.setSoTimeout(soTimeout.intValue());
- if (tcpNoDelay != null)
- socket.setTcpNoDelay(tcpNoDelay.booleanValue());
+ if (tcpNoDelay != null) {
+ try {
+ socket.setTcpNoDelay(tcpNoDelay.booleanValue());
+ } catch (SocketException e) {
+ // Some socket types may not support this option which is set by default
+ }
+ }
}
public void setProperties(ServerSocket socket) throws SocketException{
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 20dea22..9484a20 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -84,6 +84,11 @@
<bug>63570</bug>: Fix regression retrieving local address with
the NIO connector. Submitted by Aditya Kadakia. (remm)
</fix>
+ <fix>
+ <bug>63568</bug>: Avoid error when trying to set tcpNoDelay on socket
+ types that do not support it, which can occur when using the NIO
+ inherited channel capability. Submitted by František Kučera. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org