phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.35k stars 1.43k forks source link

Fix timeout after 1 minute error on node >=v11.3 in websocket-relay #340

Closed alphacornutum closed 4 years ago

alphacornutum commented 4 years ago

In node 11.3, server.headersTimeout was introduced which defaults to 60 seconds. From that node version on, the websocket-relay.js streamServer would timeout after these 60 seconds, and close the incoming ffmpeg stream. This leads to a Error writing trailer of http://localhost:8081/supersecret: Broken pipe error in Ffmpeg. Setting headersTimeout to 0 solves this.