mirror of
https://github.com/tuna/tunasync.git
synced 2025-12-25 22:02:46 +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…
Reference in New Issue