Skip to content

Commit

Permalink
main: imp code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizzick committed Jul 3, 2024
1 parent e2b8ec5 commit 7ba8eb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,12 @@ func (opts *Options) initUpstreams(
}

if opts.UpstreamMode != "" {
return config.UpstreamMode.UnmarshalText([]byte(opts.UpstreamMode))
err = config.UpstreamMode.UnmarshalText([]byte(opts.UpstreamMode))
if err != nil {
return fmt.Errorf("parsing upstream mode: %w", err)
}

return nil
}

config.UpstreamMode = proxy.UpstreamModeLoadBalance
Expand Down

0 comments on commit 7ba8eb7

Please sign in to comment.