360938 Connections closed after a while.
Resetting _total_no_progress when progress is made, to avoid that the endpoint is closed after a while of normal activity.
This commit is contained in:
parent
72310d0c03
commit
f2bf8c277b
|
@ -7,7 +7,6 @@ import org.eclipse.jetty.http.HttpStatus;
|
|||
import org.eclipse.jetty.io.AsyncEndPoint;
|
||||
import org.eclipse.jetty.io.Connection;
|
||||
import org.eclipse.jetty.io.EndPoint;
|
||||
import org.eclipse.jetty.io.nio.ChannelEndPoint;
|
||||
import org.eclipse.jetty.io.nio.SelectChannelEndPoint;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -133,18 +132,22 @@ public class AsyncHttpConnection extends HttpConnection
|
|||
if (_generator.isCommitted() && !_generator.isComplete() && _endp.isOpen() && !_endp.isOutputShutdown())
|
||||
((AsyncEndPoint)_endp).scheduleWrite(); // TODO. This should not be required
|
||||
|
||||
if (!some_progress)
|
||||
if (some_progress)
|
||||
{
|
||||
_total_no_progress++;
|
||||
_total_no_progress=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int totalNoProgress=++_total_no_progress;
|
||||
|
||||
if (NO_PROGRESS_INFO>0 && _total_no_progress%NO_PROGRESS_INFO==0 && (NO_PROGRESS_CLOSE<=0 || _total_no_progress< NO_PROGRESS_CLOSE))
|
||||
if (NO_PROGRESS_INFO>0 && totalNoProgress==NO_PROGRESS_INFO && (NO_PROGRESS_CLOSE<=0 || totalNoProgress<NO_PROGRESS_CLOSE))
|
||||
{
|
||||
LOG.info("EndPoint making no progress: "+_total_no_progress+" "+_endp);
|
||||
LOG.info("EndPoint making no progress: {} {}", totalNoProgress, _endp);
|
||||
}
|
||||
|
||||
if (NO_PROGRESS_CLOSE>0 && _total_no_progress==NO_PROGRESS_CLOSE)
|
||||
if (NO_PROGRESS_CLOSE>0 && totalNoProgress==NO_PROGRESS_CLOSE)
|
||||
{
|
||||
LOG.warn("Closing EndPoint making no progress: "+_total_no_progress+" "+_endp);
|
||||
LOG.warn("Closing EndPoint making no progress: {} {}", totalNoProgress, _endp);
|
||||
if (_endp instanceof SelectChannelEndPoint)
|
||||
{
|
||||
System.err.println(((SelectChannelEndPoint)_endp).getSelectManager().dump());
|
||||
|
|
Loading…
Reference in New Issue