-
Notifications
You must be signed in to change notification settings - Fork 573
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
Cleanup sessions on Multisig Broker Server #5480
Conversation
36479c0
to
cd90e54
Compare
* session should still be considered active | ||
*/ | ||
private isSessionActive(sessionId: string): boolean { | ||
for (const client of this.clients.values()) { |
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.
Keeping this in mind for a followup task - do you think we should store a list of client IDs on the session? Here and in broadcast
we iterate through all of the clients and filter out the ones that aren't in the right session 🫣
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.
Yeah I think that'd be a good change. I imagine we'll eventually get more and more logic around that, so having it easily accessible will be good.
multisigClient.onConnectedMessage.on(() => { | ||
if (sessionId) { | ||
Assert.isNotNull(multisigClient) | ||
multisigClient.joinSession(sessionId) | ||
multisigClient.onConnectedMessage.clear() | ||
} | ||
}) |
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.
Should we block on waiting for a confirmed connection? If the connected
message gets dropped for some reason then we'll continue without ever joining the session. Maybe that's being too paranoid about dropped messages 😅
Summary
Closes IFL-3022
Testing Plan
Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference)? If yes, link a
related documentation pull request for the website.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and label it with
breaking-change-rpc
orbreaking-change-sdk
.