web_socket_client icon indicating copy to clipboard operation
web_socket_client copied to clipboard

docs: authentication issues on connect

Open FritzMatthaeus opened this issue 9 months ago • 2 comments

Description

Thank you for the package. I want to know how the package handles a 401 on the handshaking GET call before upgrading the http connection to a websocket.

I need to catch this 401 in order to not reattempt to reconnect. As far as i understood your code, the Websocket is trying to reconnect on every kind of Exception. How could i implement it, that i catch the 401 and prevent a reconnect?

Thank you for your support.

FritzMatthaeus avatar Apr 03 '25 12:04 FritzMatthaeus

Yeah, I am also not getting the unauthorized state back. I need to handle it separately rather than trying to reconnect. A way to catch this or a callback or something would be helpful.

BirjuVachhani avatar Apr 14 '25 11:04 BirjuVachhani

Any update on this, I'm also facing the issue which leads to multiple re-connection attempts.

devplanet-dp avatar May 23 '25 07:05 devplanet-dp