/** * Implemented for bug 79865 * * <p>Disable the Jetty timeout for for this request. * * <p>By default (and our normal configuration) Jetty has a 60 second idle timeout (10 if the * server is busy) for connection endpoints. There's another task that keeps track of what * connections have timeouts and periodically works over a queue and closes endpoints that have * been timed out. This plays havoc with DAV over slow connections and whenever we have a long * pause. * * @throws IOException */ protected void disableJettyTimeout() throws IOException { // millisecond value. 0 or negative means infinite. long maxIdleTime = LC.zimbra_dav_max_idle_time_ms.intValue(); EndPoint endPoint = HttpConnection.getCurrentConnection().getEndPoint(); if (endPoint instanceof SelectChannelEndPoint) { SelectChannelEndPoint scEndPoint = (SelectChannelEndPoint) endPoint; scEndPoint.setIdleTimeout(maxIdleTime); } }