Merge pull request #96 from jacoop/jacoop-patch-1

Don't exit for non-fatal errors
This commit is contained in:
Yami Odymel 2025-04-27 12:43:47 +08:00 committed by GitHub
commit 77329840d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,6 @@ func (w *Channel) Run() {
} }
if strings.Contains(body, "<title>Just a moment...</title>") { if strings.Contains(body, "<title>Just a moment...</title>") {
w.log(logTypeError, "Cloudflare anti-bot page detected, Try providing cf-cookie and user-agent (Check GitHub for instructions)... Exiting") w.log(logTypeError, "Cloudflare anti-bot page detected, Try providing cf-cookie and user-agent (Check GitHub for instructions)... Exiting")
os.Exit(1)
} }
w.log(logTypeInfo, "channel is offline, check again %d min(s) later", w.Interval) w.log(logTypeInfo, "channel is offline, check again %d min(s) later", w.Interval)
<-time.After(time.Duration(w.Interval) * time.Minute) // minutes cooldown to check online status <-time.After(time.Duration(w.Interval) * time.Minute) // minutes cooldown to check online status