diff --git a/src/journal/src/Journal/Internal/BufferClaim.hs b/src/journal/src/Journal/Internal/BufferClaim.hs index 90f8d35c..1632ed16 100644 --- a/src/journal/src/Journal/Internal/BufferClaim.hs +++ b/src/journal/src/Journal/Internal/BufferClaim.hs @@ -31,6 +31,7 @@ commit :: BufferClaim -> Logger -> IO () commit (BufferClaim bb) logger = do let Capacity frameLen = getCapacity bb logg logger ("commit, frameLen: " ++ show frameLen) + writeFrameType bb 0 Valid writeFrameLength bb 0 (HeaderLength (int2Int32 frameLen)) abort :: BufferClaim -> IO () diff --git a/src/journal/src/Journal/MP.hs b/src/journal/src/Journal/MP.hs index 4c93c95f..5b9a3a57 100644 --- a/src/journal/src/Journal/MP.hs +++ b/src/journal/src/Journal/MP.hs @@ -90,7 +90,7 @@ readJournal jour = do readJournal jour else readJournal jour -- If len is negative then the writer hasn't -- finished writing the padding yet. - else if len <= 0 + else if len <= 0 || tag == Empty then readJournal jour else do assertMMsg (show len) (len > 0)