You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If not catch error except Exception as e: it is silenced.
When disconnecting starlette receives websocket.close instead of websocket.disconnect.
The problem seems to be here https://github.com/frankie567/httpx-ws/blob/main/httpx_ws/transport.py#L95
websocket.close needs to be converted to websocket.disconnect, just like websocket.send is converted to websocket.receive
Same issue encountered here. I agree with @cfytrok that websocket.disconnect needs to be emitted. (thanks for the lib btw @frankie567 , super helpful).
How do you work around this? I'm trying to write a pull request to fix this but I'm no expert in websockets, and I got clueless upon seeing that wsproto does not have a class for disconnect, but for close only.
Can this be done by doing a blanket replacement of "websocket.close" for "websocket.disconnect"?
Two problems:
except Exception as e:
it is silenced.The problem seems to be here https://github.com/frankie567/httpx-ws/blob/main/httpx_ws/transport.py#L95
websocket.close needs to be converted to websocket.disconnect, just like websocket.send is converted to websocket.receive
The text was updated successfully, but these errors were encountered: