fix MetricsHttpAgent metrics twice (#5029)

This commit is contained in:
shalk(xiao kun) 2021-03-10 11:24:03 +08:00 committed by GitHub
parent b1c39a6354
commit 3dd7915aa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,6 @@ public class MetricsHttpAgent implements HttpAgent {
throw e; throw e;
} finally { } finally {
timer.observeDuration(); timer.observeDuration();
timer.close();
} }
return result; return result;
@ -70,7 +69,6 @@ public class MetricsHttpAgent implements HttpAgent {
throw e; throw e;
} finally { } finally {
timer.observeDuration(); timer.observeDuration();
timer.close();
} }
return result; return result;
@ -84,11 +82,9 @@ public class MetricsHttpAgent implements HttpAgent {
try { try {
result = httpAgent.httpDelete(path, headers, paramValues, encode, readTimeoutMs); result = httpAgent.httpDelete(path, headers, paramValues, encode, readTimeoutMs);
} catch (IOException e) { } catch (IOException e) {
throw e; throw e;
} finally { } finally {
timer.observeDuration(); timer.observeDuration();
timer.close();
} }
return result; return result;