Return result of error check immediately
Don't need to check that the error is not nil before returning it.
@@ -82,13 +82,9 @@ func (m *EtcdService) RefreshMonitor(ctx context.Context, name string, entity *t
// lease with keep-alive.
if mon != nil && mon.ttl == ttl {
_, kaerr := m.client.KeepAliveOnce(ctx, mon.leaseID)
- if kaerr != nil {
return kaerr
}
- return nil
- }
-
// If the ttls do not match or the monitor doesn't exist, create a new lease
// and do a put on the key with that lease.
lease, err := m.client.Grant(ctx, ttl)
