mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
return error early
fix https://github.com/chrislusf/seaweedfs/issues/2370
This commit is contained in:
parent
4800d0ce26
commit
e6ef7b2387
|
@ -66,6 +66,10 @@ func Assign(masterFn GetMasterFn, grpcDialOption grpc.DialOption, primaryRequest
|
||||||
return grpcErr
|
return grpcErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if resp.Error != "" {
|
||||||
|
return fmt.Errorf("assignRequest: %v", resp.Error)
|
||||||
|
}
|
||||||
|
|
||||||
ret.Count = resp.Count
|
ret.Count = resp.Count
|
||||||
ret.Fid = resp.Fid
|
ret.Fid = resp.Fid
|
||||||
ret.Url = resp.Location.Url
|
ret.Url = resp.Location.Url
|
||||||
|
@ -80,10 +84,6 @@ func Assign(masterFn GetMasterFn, grpcDialOption grpc.DialOption, primaryRequest
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if resp.Error != "" {
|
|
||||||
return fmt.Errorf("assignRequest: %v", resp.Error)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue