You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/03/12 11:33:29 UTC
svn commit: r1666122 -
/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: markt
Date: Thu Mar 12 10:33:28 2015
New Revision: 1666122
URL: http://svn.apache.org/r1666122
Log:
Follow-up to r1666121.
Modified:
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1666122&r1=1666121&r2=1666122&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Mar 12 10:33:28 2015
@@ -2472,8 +2472,14 @@ public class AprEndpoint extends Abstrac
@Override
public void registerforEvent(int timeout, boolean read, boolean write) {
- endpoint.getPoller().add(getSocket().longValue(), timeout,
- (read ? Poll.APR_POLLIN : 0) | (write ? Poll.APR_POLLOUT : 0));
+ // Make sure an already closed socket is not added to the poller
+ synchronized (closedLock) {
+ if (closed) {
+ return;
+ }
+ endpoint.getPoller().add(getSocket().longValue(), timeout,
+ (read ? Poll.APR_POLLIN : 0) | (write ? Poll.APR_POLLOUT : 0));
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org