muesli / prism

An RTMP stream recaster / splitter
MIT License
166 stars 19 forks source link

More graceful disconnect/reconnect logic #1

Closed mattdsteele closed 3 years ago

mattdsteele commented 3 years ago

I think you're tracking on this, but I'm encountering broken pipes when there's a disconnect from the downstream RTMP streams (for example, if an Owncast instance restarts).

It manifests itself with a wall of errors like:

write tcp 206.189.205.219:50394->172.104.12.173:1935: write: broken pipe

My current workaround is just to kill the prism instance.

muesli commented 3 years ago

You're right, that's a problematic situation at the moment. I do have it marked as a TODO in the sources, as I'm not quite sure yet how I want to handle this situation:

  1. Abort with an error
  2. Re-connect and drop frames intermittently
  3. Re-connect and buffer missed frames, which would then be re-played as soon as the connection was re-established

Feedback appreciated!

muesli commented 3 years ago

I've opted for the second option: we try to re-establish a connection, but won't buffer any packages to keep the multiple outgoing streams in sync.

Fixed in master.