agent: return error and message absence differently when getting notification messages (#1535)

* agent: return error and message absence differently when getting notification messages

* fix test

* mapM

* inline nse functions, release lock on error or no message
This commit is contained in:
Evgeny authored and GitHub committed 2025-05-06 16:20:01 +01:00
1 parent a632eea75b
commit cb59a449dd
5 files changed
+20 -17

No files matched your search

+1
View File
@@ -801,6 +801,7 @@ getSMPMessage c rpKey rId =
OK -> pure Nothing
cmd@(MSG msg) -> liftIO (writeSMPMessage c rId cmd) $> Just msg
r -> throwE $ unexpectedResponse r
{-# INLINE getSMPMessage #-}
-- | Subscribe to the SMP queue notifications.
--