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

do not propagate "use of closed conn" error if expected #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

costela
Copy link

@costela costela commented Feb 9, 2022

There's unfortunately no way (AFAIK) of actively interrupting a
net.Listener.Accept() call, so we have to deal with it erroring out if/when
its net.Listener is closed (see #39).

Unfortunately(2) there's also no better way of matching the low-level
error than string checks, since it is not exported by the stdlib.

There's unfortunately no way (AFAIK) of actively interrupting a
net.Listener.Accept() call, so we have to deal with it erroring out when
its net.Listener is closed.
Unfortunately(2) there's also no better way of matching the low-level
error than string checks, since it is not exported by the stdlib.
@vtolstov
Copy link

vtolstov commented Mar 20, 2022

with never version of go you can do errors.Is
and such error already public exported

@costela
Copy link
Author

costela commented Mar 20, 2022

hi @vtolstov

Not sure I understand what you mean. Go 1.18 still hasn't exported the underlying error. (note the internal path)

Or am I missing something? 🤔

(nevermind; see below)

@costela
Copy link
Author

costela commented Mar 20, 2022

Ah, I take it back: looks like it was indirectly exported in 1.16.

I'll see if that works.

@vtolstov
Copy link

Ah, I take it back: looks like it was indirectly exported in 1.16.

I'll see if that works.

yes

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.

2 participants