satellite/satellitedb: fix nil panic in UpdateCheckIn

Change-Id: If6ae2c3d9b7c269b0a9d652e68854091f668b5ec
This commit is contained in:
Egon Elbre 2021-05-25 00:30:36 +03:00
parent 79172777bd
commit cdcc67207c

View File

@ -1706,9 +1706,12 @@ func (cache *overlaycache) UpdateCheckIn(ctx context.Context, node overlay.NodeC
// args $17,
walletFeatures,
)
affected, affectedErr := res.RowsAffected()
if affected > 0 && err == nil && affectedErr == nil {
return nil
if err == nil {
affected, affectedErr := res.RowsAffected()
if affectedErr == nil && affected > 0 {
return nil
}
}
_, err = cache.db.ExecContext(ctx, `