mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-23 15:12:26 +00:00
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:
1 parent
a632eea75b
commit
cb59a449dd
5 files changed
+20
-17
No files matched your search
@@ -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.
|
||||
--
|
||||
|
||||
Reference in new issue
Block a user