Mark, On 3/11/15 4:01 PM, [email protected] wrote: > Author: markt > Date: Wed Mar 11 20:01:28 2015 > New Revision: 1665989 > > URL: http://svn.apache.org/r1665989 > Log: > Add a comment > > Modified: > tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java > > Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1665989&r1=1665988&r2=1665989&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Mar 11 > 20:01:28 2015 > @@ -1512,6 +1512,11 @@ public class AprEndpoint extends Abstrac > } > > > + /* > + * This is only called from the SocketWrapper to ensure that it is > only > + * called once per socket. Calling it more than once typically > results > + * in the JVM crash. > + */ > protected void close(long socket) { > synchronized (this) { > closeList.add(socket, 0, 0);
Is there a reason to prefer synchronized(this) here to simply using a synchronized method? As for an architectural comment: if only the SocketWrapper should be calling that method, should the method not exist elsewhere... or with some other kind of access strategy? -chris
signature.asc
Description: OpenPGP digital signature
