Open dmarman opened 7 years ago
I run into the same issue. How did you reset your connection properly?
I couldn't solve it. Instead of using websockets for the stream, I just sent a string message via websocket to the client saying that the file was ready to download. After that the client makes a get request and downloads the file via https.
I have a server and a client set up with nodejs. The server is sending a file to the client with socket.io-stream. When the file is transfered I want to start working with it on the client side. For that I am listening to the 'end' event of the stream. My code works but only once. On the first file I send the event is triggered, but not on the next ones. After the first file, the next ones are corrupted and are 0 Bytes, I guess that's why the event is never triggered again.
server.js
client.js
I've tried using 'end' and 'finish' events, setting autoClose as true and false, using stream.close() and stream.end(), but nothing works. For me is like something is not resetting properly.