Skip to content

Commit

Permalink
feat: add more statuses to trackerDown
Browse files Browse the repository at this point in the history
  • Loading branch information
s0up4200 committed Jan 17, 2025
1 parent b578e1a commit 9fe8bb9
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion config/torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,44 @@ var (
}

trackerDownStatuses = []string{
"bad gateway",
// libtorrent HTTP status messages
// https://github.com/arvidn/libtorrent/blob/RC_2_0/src/error_code.cpp#L320-L339
// https://github.com/arvidn/libtorrent/blob/RC_1_2/src/error_code.cpp#L298-L317
"continue", // 100 - server still processing
"multiple choices", // 300 - could indicate load balancer issues
"not modified", // 304 - could be caching issues
"bad request", // 400
"unauthorized", // 401
"forbidden", // 403
"internal server error", // 500
"not implemented", // 501
"bad gateway", // 502
"service unavailable", // 503
"moved permanently", // 301
"moved temporarily", // 302
"(unknown http error)",

// tracker/network errors
"down",
"maintenance",
"tracker is down",
"tracker unavailable",
"truncated",
"unreachable",
"not working",
"not responding",
"timeout",
"refused",
"no connection",
"cannot connect",
"connection failed",
"ssl error",
"no data",
"timed out",
"temporarily disabled",
"unresolvable",
"host not found",
"offline",
}
)

Expand Down

0 comments on commit 9fe8bb9

Please sign in to comment.