-
-
Notifications
You must be signed in to change notification settings - Fork 78
smp server: refactor subscriptions and delivery in order to always response SOK on subscription with an optional message to follow. #1573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -1957,21 +1974,6 @@ client | |||
VRVerified q -> Right (q, t'') | |||
VRFailed e -> Left (corrId', entId', ERR e) | |||
|
|||
deliverMessage :: T.Text -> QueueRec -> RecipientId -> Sub -> Maybe Message -> IO (Transmission BrokerMsg) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
47cc842
to
4ea1152
Compare
aef50e9
to
0c1ba54
Compare
894f159
to
f45f5a2
Compare
No description provided.