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
fix(websocket): request Sonos subprotocol via ws protocols arg
The S2 WebSocket sent 'Sec-WebSocket-Protocol: v1.api.smartspeaker.audio'
as a raw header. ws only tracks a requested-protocol set when the
subprotocol is passed as the constructor's protocols argument; with the
header form that set is empty, so when Sonos echoes the subprotocol in its
101 response ws aborts with 'Server sent a subprotocol but none was
requested'. The handshake reached 101 but then errored — observed in the
field as 'Failed to connect (upgrade 101 Switching Protocols)', leaving
the state controller in an endless reconnect loop and no external events.
Pass the subprotocol as the protocols argument instead.
Bump 0.2.2.