Skip to content

Commit

Permalink
fix nil pointer dereference: check err first
Browse files Browse the repository at this point in the history
  • Loading branch information
ziqin committed Aug 1, 2019
1 parent 4854d9b commit 30259da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ func newMirrorProvider(mirror mirrorConfig, cfg *Config) mirrorProvider {
retry: mirror.Retry,
}
p, err := newRsyncProvider(rc)
p.isMaster = isMaster
if err != nil {
panic(err)
}
p.isMaster = isMaster
provider = p
case provTwoStageRsync:
rc := twoStageRsyncConfig{
Expand Down

0 comments on commit 30259da

Please sign in to comment.