To reproduce:
-
Run any websocket server. eg, 'meteor create x; cd x; meteor'. Now we have a websocket server on port 3001. (Meteor will tell you port 3000, but that's meteor's use of http-proxy; 3001 is the unproxied version.)
-
Run the above script.
-
Send lots of data through the proxy to the websocket. eg, install https://github.com/progrium/wssh and run
yes | wssh localhost:6767/websocket