Author: kkolinko Date: Mon Mar 10 11:43:03 2014 New Revision: 1575910 URL: http://svn.apache.org/r1575910 Log: Followup to r1575885 Do not hold writeLock when calling onError().
Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java?rev=1575910&r1=1575909&r2=1575910&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java Mon Mar 10 11:43:03 2014 @@ -169,19 +169,19 @@ public abstract class AbstractServletOut protected final void onWritePossible() throws IOException { - synchronized (writeLock) { - try { + try { + synchronized (writeLock) { if (buffer != null) { writeInternal(buffer, 0, buffer.length); } - } catch (Throwable t) { - ExceptionUtils.handleThrowable(t); - onError(t); - if (t instanceof IOException) { - throw t; - } else { - throw new IOException(t); - } + } + } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); + onError(t); + if (t instanceof IOException) { + throw t; + } else { + throw new IOException(t); } } @@ -228,7 +228,7 @@ public abstract class AbstractServletOut * Abstract method to be overridden by concrete implementations. The base * class will ensure that there are no concurrent calls to this method for * the same socket by ensuring that the writeLock is held when making any - * calls this method. + * calls to this method. */ protected abstract int doWrite(boolean block, byte[] b, int off, int len) throws IOException; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org