Skip to content

Commit

Permalink
Ignore close errors in icecast output.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Aug 29, 2023
1 parent c5fd1d1 commit 291ebcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Fixed:
- Fixed HTTP response status in `output.harbor` (#3255)
- Make sure main HLS playlist is regenerated after being
unlinked (#3275)
- Fixed hard crash on icecast disconnection errors.
- Fix `output.harbor` encoder header when encoding with
`%ogg`, `%vorbis` and etc. (#3276)
- Fixed quality argument parsing in ffmpeg encoders (#3267)
Expand Down
7 changes: 6 additions & 1 deletion src/core/outputs/icecast2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,12 @@ class output p =
| Cry.Disconnected -> ()
| Cry.Connected _ ->
self#log#important "Closing connection...";
Cry.close connection;
(try Cry.close connection
with exn ->
let bt = Printexc.get_backtrace () in
Utils.log_exception ~log:self#log ~bt
(Printf.sprintf "Error while closing connection: %s"
(Printexc.to_string exn)));
on_disconnect ()
end;
match dump with Some f -> close_out f | None -> ()
Expand Down

0 comments on commit 291ebcb

Please sign in to comment.