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 2f7fb67 commit 284b758
Showing 1 changed file with 2 additions and 2 deletions.
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 284b758

Please sign in to comment.