Closed dctrwatson closed 10 years ago
Hi @dctrwatson ,
are you using the pushstream.js or another client? The close frame is sent only when the websockect connection is already opened. The 403 response is sent before the open handshake is finished. So the close code cannot be sent on this moment.
This was solved on tag 0.4.0 3d3a204177d3a7ab8a2858e04e792a6d11bf133f
We are working to reduce the number of open connections and silent channels.
Catching 403 for switching to periodic polling for normal endpoint was doable. However, with websockets, it's hard/impossible to distinguish 403 from an error.
WS support arbitrary close codes, would it be possible to send close code explaining it's unauthorized so the connection may gracefully close?