Skip to content

Commit

Permalink
Fix request logging on Debug log level
Browse files Browse the repository at this point in the history
Because of a bug in request logging on the debug log level
specifically when telemetry is enabled, all request bodies delivered
to chainweb have their contents repeated infinitely.
Change-Id: Id0000000fcfba9b9c67184fc89a07944f416f739
  • Loading branch information
edmundnoble committed Jan 15, 2025
1 parent 1dd47a1 commit 5905919
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Chainweb/Utils/RequestLog.hs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ logRequest lvl req = do
fetchedChunk <- newIORef False
let fetchChunk = do
fetched <- readIORef fetchedChunk
writeIORef fetchedChunk True
if fetched then return mempty
else return finalStrictBody
return (setRequestBodyChunks fetchChunk req, Right finalStrictBody)
Expand Down

0 comments on commit 5905919

Please sign in to comment.