Update MTPROXY_CHECK_TIMEOUT to 45s in docker-compose and documentation; adjust default timeout handling in code for improved performance under slow network conditions.
Publish mtproxy_checker Docker image / test (push) Successful in 13s
Publish mtproxy_checker Docker image / build-and-push (push) Successful in 52s

This commit is contained in:
Denozordec
2026-04-11 13:39:52 +07:00
parent 6a6183a994
commit 6f2dbcbca3
5 changed files with 25 additions and 6 deletions
+5
View File
@@ -3,6 +3,7 @@ package checkresult
import (
"context"
"errors"
"net"
"mtproxy_checker/internal/checker"
)
@@ -18,5 +19,9 @@ func Classify(err error) (exitCode int, message string) {
if errors.Is(err, context.DeadlineExceeded) {
return 4, "timeout"
}
var ne net.Error
if errors.As(err, &ne) && ne.Timeout() {
return 4, "timeout"
}
return 1, err.Error()
}