File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ public static async Task<T> Measure<T>(
161161
162162 try {
163163 var task = action ( ) ;
164- result = task . IsCompleted ? task . Result : await action ( ) ;
164+ result = task . IsCompleted ? task . Result : await task ;
165165 }
166166 catch ( Exception ) {
167167 errorCount ? . Inc ( labels ) ;
@@ -199,7 +199,7 @@ public static async Task<T> Measure<T>(
199199
200200 try {
201201 var task = action ( ) ;
202- result = task . IsCompleted ? task . Result : await action ( ) ;
202+ result = task . IsCompleted ? task . Result : await task ;
203203 }
204204 catch ( Exception ) {
205205 errorCount ? . Inc ( labels : labels ) ;
@@ -238,7 +238,7 @@ public static async Task<T> Measure<T>(
238238
239239 try {
240240 var task = action ( ) ;
241- result = task . IsCompleted ? task . Result : await action ( ) ;
241+ result = task . IsCompleted ? task . Result : await task ;
242242 }
243243 catch ( Exception ) {
244244 errorCount ? . Inc ( labels ) ;
@@ -253,4 +253,4 @@ public static async Task<T> Measure<T>(
253253 return result ;
254254 }
255255 }
256- }
256+ }
You can’t perform that action at this time.
0 commit comments