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

socket.once is undefined error during agent shutdown on mobile #2103

Open
bryce-mcmath opened this issue Nov 23, 2024 · 1 comment
Open

socket.once is undefined error during agent shutdown on mobile #2103

bryce-mcmath opened this issue Nov 23, 2024 · 1 comment

Comments

@bryce-mcmath
Copy link
Contributor

This error causes agent.shutdown() to fail before it sets agent.isInitialized to false which prevents the graceful shutdown and restart of mobile Credo agents (between auth lockouts for example)

Here is the relevant line (I think):

stillOpenSocketClosingPromises.push(new Promise((resolve) => socket.once('close', resolve)))
socket.close()

There has been some suggestions in Credo Discord on how to fix, I would make a PR myself but I'm going on vacation for a few weeks

@bryce-mcmath
Copy link
Contributor Author

@jleach @cvarjao @al-rosenthal FYI

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

1 participant