Author: markt Date: Mon Feb 23 11:26:56 2015 New Revision: 1661642 URL: http://svn.apache.org/r1661642 Log: Don't default to an infinite timeout for write. Generally, writes should happen (fairly) quickly.
Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessor.java Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessor.java?rev=1661642&r1=1661641&r2=1661642&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/UpgradeProcessor.java Mon Feb 23 11:26:56 2015 @@ -54,8 +54,13 @@ public class UpgradeProcessor implements this.upgradeServletOutputStream = new UpgradeServletOutputStream(wrapper); wrapper.unRead(leftOverInput); + /* + * Infinite read timeouts make sense since it is unknown how quickly - + * or even if at all - a client will send data. However, leave the write + * timeout alone since when the server writes to the client that should + * always happen within the configured timeout. + */ wrapper.setReadTimeout(INFINITE_TIMEOUT); - wrapper.setWriteTimeout(INFINITE_TIMEOUT); if (httpUpgradeHandler instanceof InternalHttpUpgradeHandler) { wrapper.setInternalUpgrade(true); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org