Fix linter configuration

This commit is contained in:
世界 committed 2025-01-01 12:18:56 +08:00
1 parent bc2e3960e4
commit 1bc27a32c2
9 files changed
+22 -6

No files matched your search

+2 -2
View File
@@ -63,8 +63,8 @@ func NewHysteria(ctx context.Context, router adapter.Router, logger log.ContextL
}
if len(options.Down) > 0 {
receiveBps, err = humanize.ParseBytes(options.Down)
if receiveBps == 0 {
return nil, E.New("invalid down speed format: ", options.Down)
if err != nil {
return nil, E.Cause(err, "invalid down speed format: ", options.Down)
}
} else {
receiveBps = uint64(options.DownMbps) * hysteria.MbpsToBps