Skip to content

Commit

Permalink
Fixed infinite loop because of bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlauer1 committed Jul 10, 2024
1 parent aa493f2 commit dc76362
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/src/OpenTelemetry/LogRecordProcessor/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ simpleProcessor :: LogRecordExporter body -> IO (LogRecordProcessor body)
simpleProcessor LogRecordExporter {..} = do
(inChan :: InChan (LogRecord body), outChan :: OutChan (LogRecord body)) <- newChan
exportWorker <- async $ forever $ do
bracket
bracketOnError
(readChan outChan)
(writeChan inChan)
exportSingleLogRecord
Expand Down
1 change: 1 addition & 0 deletions sdk/test/OpenTelemetry/LogRecordProcessorSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ spec = describe "LogRecordProcessor" $ do

numExports <- readIORef numExportsRef
numExports `shouldBe` 3

exportRes <- logRecordExporterExport testExporter H.empty
exportRes `shouldSatisfy` \case
Success -> False
Expand Down

0 comments on commit dc76362

Please sign in to comment.