diff --git a/pkg/utils/bwlimit.go b/pkg/utils/bwlimit.go index 202529b..c444318 100644 --- a/pkg/utils/bwlimit.go +++ b/pkg/utils/bwlimit.go @@ -10,5 +10,5 @@ func IsBytesLimitReached(err error) bool { } func AreAllTokensExpired(err error) bool { - return err.Error() == "all tokens are expired" + return err != nil && err.Error() == "all tokens are expired" }