cmux icon indicating copy to clipboard operation
cmux copied to clipboard

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

Open costela opened this issue 3 years ago • 4 comments

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.

costela avatar Feb 09 '22 21:02 costela

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

vtolstov avatar Mar 20 '22 20:03 vtolstov

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? :thinking:~

(nevermind; see below)

costela avatar Mar 20 '22 21:03 costela

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

I'll see if that works.

costela avatar Mar 20 '22 21:03 costela

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

I'll see if that works.

yes

vtolstov avatar Mar 21 '22 07:03 vtolstov