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

Unhandled Promise Rejection when writing to a closed/unavailable socket #19

Open
joebwan opened this issue Sep 2, 2020 · 1 comment

Comments

@joebwan
Copy link

joebwan commented Sep 2, 2020

If the AGI socket closes for some reason ding-dong (context.js) will throw an unhandled promise rejection error.

See line 117 of context.js in master branch.

UnhandledPromiseRejectionWarning: Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:266:14)
at Socket.Writable.write (_stream_writable.js:315:5)
at Readable.write (node_modules/readable-stream/lib/_stream_readable.js:855:33)
at Context.send (lib/context.js:117:15)
at lib/context.js:130:10
at new Promise ()
at Context.sendCommand (lib/context.js:129:10)

@joebwan
Copy link
Author

joebwan commented Sep 2, 2020

These errors do not get logged to STDOUT, but instead get bubbled up to node.js for logging to STDERR.

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