mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
v3rpc: only fill lease grant header if no error
Was panicking under cluster fault injection.
This commit is contained in:
parent
ca83793876
commit
06ea8aee11
@ -38,6 +38,9 @@ func (ls *LeaseServer) LeaseGrant(ctx context.Context, cr *pb.LeaseGrantRequest)
|
||||
if err == lease.ErrLeaseExists {
|
||||
return nil, rpctypes.ErrLeaseExist
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
ls.hdr.fill(resp.Header)
|
||||
return resp, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user