Skip to content

Commit 702e53e

Browse files
committed
Prevent memory leak
1 parent 955b03f commit 702e53e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Apitally/ApitallyMiddleware.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ out var validationErrors
221221
catch (Exception ex)
222222
{
223223
logger.LogError(ex, "Error in Apitally middleware");
224+
225+
// Prevent memory leak
226+
activityHandle.EndCollection();
224227
}
225228
finally
226229
{

0 commit comments

Comments
 (0)