HTTPCLIENT-1413: Fixed divide by zero error in FutureRequestExecutionMetrics

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1529295 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-10-04 20:54:49 +00:00
parent cc6a57e04a
commit 4282ad94e3
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ public final class FutureRequestExecutionMetrics {
public long averageDuration() {
final long counter = count.get();
return cumulativeDuration.get() / counter;
return counter > 0 ? cumulativeDuration.get() / counter : 0;
}
@Override