mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 11:42:43 +00:00
fix nil pointer dereference: check err first
This commit is contained in:
parent
4854d9b981
commit
30259da0f0
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user