Skip to content
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

Database connections not being closed when messages are sent #360

Closed
nick-verida opened this issue Nov 14, 2023 · 3 comments · Fixed by #355
Closed

Database connections not being closed when messages are sent #360

nick-verida opened this issue Nov 14, 2023 · 3 comments · Fixed by #355
Assignees

Comments

@nick-verida
Copy link
Contributor

From @tahpot in Discord:

So... the code that sends the message creates a database instance to the remote database and then sends it, but doesn't close. It's not possible (at the moment anyway) to get that database connection and close it. So I'll need to do a protocol update to fix this

@tahpot
Copy link
Member

tahpot commented Nov 14, 2023

Fix is in this PR: #355

@tahpot tahpot mentioned this issue Nov 14, 2023
@nick-verida
Copy link
Contributor Author

Using the develop branch on 22-Nov-23, this doesn't seem to be fixed.

It does work correctly if I just open and close a context, but in this case it doesn't work:

this.veridaContext = await client.openContext("DID Message Sender", true) as Context;
const messaging = await this.veridaContext.getMessaging(); // works without this
await this.veridaContext.close();

@tahpot
Copy link
Member

tahpot commented Dec 6, 2023

This should now be fixed with 69e3842

However, there remains an outstanding issue where a single database connection doesn't get closed when closing the context so applications may hang at the end.

This has been logged as a separate issue (#375) so this issue can be closed.

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 a pull request may close this issue.

2 participants