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

fix(http/server): Swallow NotConnected errors from listener.accept() #761

Merged
merged 2 commits into from
Jul 6, 2021

Conversation

nayeemrmn
Copy link
Contributor

Apparently another error kind that can be thrown from listener.accept() with a quirky client but shouldn't terminate the server. Experienced by #659 (comment), discussed on Discord. No repro or test, but it makes sense.

@nuts-n-bits
Copy link

Yes so fwiw the error stack is this

error: Uncaught (in promise) NotConnected: Transport endpoint is not connected (os error 107)
    throw new ErrorClass(res.err.message);
          ^
    at processResponse (deno:core/core.js:213:11)
    at Object.jsonOpAsync (deno:core/core.js:231:12)
    at async Listener.accept (deno:runtime/js/30_net.js:98:19)
    at async Server.acceptConnAndIterateHttpRequests (https://deno.land/[email protected]/http/server.ts:226:14)
    at async MuxAsyncIterator.callIteratorNext (https://deno.land/[email protected]/async/mux_async_iterator.ts:30:31)

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit 7c3f017 into denoland:main Jul 6, 2021
cmorten added a commit to cmorten/deno_std that referenced this pull request Aug 13, 2021
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 this pull request may close these issues.

3 participants