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

Method to explicitly disconnect event hub #238

Closed
ffMathy opened this issue May 22, 2024 · 4 comments
Closed

Method to explicitly disconnect event hub #238

ffMathy opened this issue May 22, 2024 · 4 comments

Comments

@ffMathy
Copy link
Contributor

ffMathy commented May 22, 2024

Is this possible? We are running out of socket connections in our pre-warmed AWS Lambda.

@gismya
Copy link
Contributor

gismya commented May 22, 2024

There is no method on the event hub right now. You should be able to reach it by using eventHub._socketIo.disconnect(), but _socketIo is marked private which means TypeScript will complain. I created a PR to add a proper method for disconnecting.

@jimmycallin
Copy link
Contributor

we also have the autoConnectEventHub option to disable automatic connection, but not sure if that helps you. we'll fix the explicit disconnect method either way

@ffMathy
Copy link
Contributor Author

ffMathy commented May 22, 2024

Great suggestion, but we are actually manually connecting to the event hub, and that is needed.

@gismya
Copy link
Contributor

gismya commented May 23, 2024

A new release with a disconnect() method on eventHub is now out. It's currently not handling pending events in any special way, which could cause issues. Please report if you find any.

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

No branches or pull requests

3 participants