Open JamoCA opened 5 years ago
thanks for reporting this issue.
Do you suggest anything to prevent this behavior ?
Track the media host/path and enfforce some sort of throttling and/or debouncing. I understand that you want it to retry immediately if a connection is dropped, but if it's not coming back up soon or is overwelmed, performing repeated requests aren't going to to help.
Maybe perform an immediate check at the same host/pasth. If no response, don't try that host/path again for 5 seconds. If no response during next check, set timeout to to 10 seconds. If no response, set the timeout out to 30 seconds (or longer) or flag is as a non-responsive endpoint and skip it in the future (or try again in 5 minutes.)
If there's a problem with the icecast stream (or playlist URLs), this script will repeatedly request the playlist URLs non-stop. Dpeending on the endpoint, it may be seen as a DOS attack. If the remote M3U file uses local paths or single filename, the local path of the webserver will be requested rather than the remote icecast server.