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

Debugging connection closed on 1006 #165

Open
nicknotfun opened this issue Oct 21, 2021 · 2 comments
Open

Debugging connection closed on 1006 #165

nicknotfun opened this issue Oct 21, 2021 · 2 comments

Comments

@nicknotfun
Copy link

I've got a client of an internal tool who runs into ABNORMAL_CLOSURE / code=1006; and it's providing difficult to reproduce other than on his machine.

The debug log pattern is:

  1. Connect to websocket
  2. Log prints "sending 322 bytes"
  3. Connection closed
  4. Reader task finished.

I'll continue to investigate, but it would be very useful if we could eliminate any reason-lacking 1006 codes; for example knowing if it's a broken resource error vs. a client bug.

@belm0
Copy link
Member

belm0 commented Oct 25, 2021

Looking at the code, it seems like this can only happen by Broken/ClosedResourceError. (_abort_web_socket() makes a 1006 without a reason string).

https://github.com/HyperionGray/trio-websocket/blob/da7e5fa32b12d241fa9ba2f01d9b682e88f4e1d5/trio_websocket/_impl.py#L1251-L1256

@cpiker
Copy link

cpiker commented Apr 30, 2024

I'm getting this error as well, python 3.8 on linux, trio_websocket version 0.11.1 installed via pip.

I only get this error when attempting to use an SSL context. Plain sockets work fine.

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

3 participants