Skip to content

Conversation

@epoberezkin
Copy link
Member

No description provided.

@epoberezkin epoberezkin requested a review from spaced4ndy as a code owner June 17, 2025 21:51
VRVerified q -> Right (q, t'')
VRFailed e -> Left (corrId', entId', ERR e)

deliverMessage :: T.Text -> QueueRec -> RecipientId -> Sub -> Maybe Message -> IO (Transmission BrokerMsg)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function unnecessarily duplicates the check for ProhibitSub at call sites and prevents different usage of messages in SUB and in ACK commands.

-- queue is usually deleted by the same client that is currently subscribed,
-- we delete subscription here, so the client with no subscriptions can be disconnected.
sub <- atomically $ TM.lookupDelete entId $ subscriptions clnt
liftIO $ mapM_ cancelSub sub
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the lack of cancel was potentially a memory leak

@epoberezkin epoberezkin changed the title smp server: refactor subscriptions and delivery smp server: refactor subscriptions and delivery in order to always response SOK on subscription with an optional message to follow. Jun 17, 2025
@epoberezkin epoberezkin merged commit 62733ef into master Jul 12, 2025
2 of 4 checks passed
@epoberezkin epoberezkin deleted the ep/refactor-subs branch July 12, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant