fix: provide websocket instead of stream to avoid potential backpressure issues (#289)#290
fix: provide websocket instead of stream to avoid potential backpressure issues (#289)#290mcollina merged 4 commits intofastify:masterfrom
Conversation
|
@mcollina As discussed here #289 (comment) I've removed stream creation completely. Another option here is to provide an object of shape Also, could be nice to provide a function to convert that socket into a stream; so the object could even be I can update this PR to include either of the aforementioned solutions. |
mcollina
left a comment
There was a problem hiding this comment.
Can you please document how to get a WebSocketStream in the README?
|
I don't think having a specific function is needed, let's just document how to create it using ws. |
|
@mcollina I've added an example to README.md |
|
CI is failing |
|
@mcollina Resolved, for some reason the unit test was relying on the count of fastify log items to be constant, updated it to fail if |
v10 of websocket required refactor: fastify/fastify-websocket#290
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Now
createWebSocketStreamis not called therefore there are no memory leaks/backpressure to worry about.Checklist
npm run testandnpm run benchmarkand the Code of conduct