Skip to content

v0.6.1

Choose a tag to compare

@rudyberends rudyberends released this 12 Aug 11:13
· 1 commit to main since this release
fix(client): receive JSON on an unencrypted connection (v0.6.1)

`handleWsMessage` decided text from binary with `typeof data === 'string'`, which is
never true: `ws` hands both kinds to the listener as a Buffer and tells them apart
with the `isBinary` argument, which was being ignored. So every JSON message on an
unencrypted connection went to the audio-chunk path and `connect()` timed out
waiting for a `server/hello` that had already arrived.

It went unnoticed because nothing in the app drives the client half, and the
encrypted path reads its bring-up frames through its own listener and its transport
frames as binary — so both of those worked. It surfaced the moment a plaintext
client was pointed at our own server.