Skip to content

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

Description

@joebwan

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions