Skip to content

Commit

Permalink
Catch reconnection errors through the on_error workflow. Fixes: #3635
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jan 16, 2024
1 parent f44d969 commit 8dcbe42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Fixed:
- Fix pop/click at the end of fade out/in (#3318)
- Fix audio/video synchronization issues when decoding live streams using ffmpeg.
- Fix issues with TLS connecting clients not being properly timed out (#3598)
- Make sure reconnection errors are router through the regulat `on_error` callback in `output.icecast` (#3635)

---

Expand Down
4 changes: 2 additions & 2 deletions src/core/outputs/icecast2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ class output p =

method icecast_send b =
try
if Cry.get_status connection = Cry.Disconnected then self#icecast_start;
Strings.iter
(fun s offset length -> Cry.send connection ~offset ~length s)
b;
Expand All @@ -567,8 +568,7 @@ class output p =
method send b =
match Cry.get_status connection with
| Cry.Disconnected when Unix.time () > restart_time ->
self#icecast_start;
self#send b
self#icecast_send b
| Cry.Connected _ -> self#icecast_send b
| _ -> ()

Expand Down

0 comments on commit 8dcbe42

Please sign in to comment.