Author: remm Date: Thu Mar 8 15:46:51 2018 New Revision: 1826249 URL: http://svn.apache.org/viewvc?rev=1826249&view=rev Log: Align the two handleAsyncException methods, but don't merge them as Http2Exception would cause problems in one of them.
Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java?rev=1826249&r1=1826248&r2=1826249&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java Thu Mar 8 15:46:51 2018 @@ -254,11 +254,19 @@ public class Http2AsyncUpgradeHandler ex } - protected void handleAsyncException() throws IOException { + private void handleAsyncException() throws IOException { if (applicationIOE != null) { - handleAppInitiatedIOException(applicationIOE); + IOException ioe = applicationIOE; + applicationIOE = null; + handleAppInitiatedIOException(ioe); } else if (error != null) { - throw new IOException(error); + Throwable error = this.error; + this.error = null; + if (error instanceof IOException) { + throw (IOException) error; + } else { + throw new IOException(error); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org