socketcluster
socketcluster copied to clipboard
Using old ws version
This is mostly a write-up, since I took a while to figure this out. I'm deploying SocketCluster to Heroku and was seeing immediate client pong timeouts. With a bit of debugging, I found that I had installed the latest version of ws
(8.5.0) which returns messages as Buffer, instead of strings, causing the === comparison with the pong message to fail.
I assume that implicit conversions in my code were hiding this issue.
TL;DR: SocketCluster requires the ws
dependency to be in the 7 major version range. I cannot judge whether it makes sense to update to 8+.
Versions used: "socketcluster-client": "16.1.1", "socketcluster-server": "16.2.1",