Update internal/session/repository_connection.go

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
jimlambrt-session-basics
Jim 6 years ago committed by GitHub
parent 88482c2f34
commit 9fdfaf3a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -258,7 +258,7 @@ func (r *Repository) UpdateConnectionState(ctx context.Context, connectionId str
db.StdRetryCnt,
db.ExpBackoff{},
func(reader db.Reader, w db.Writer) error {
// We need to update the session version as that's the aggregate
// We need to update the connection version as that's the aggregate
updatedConnection.PublicId = connectionId
updatedConnection.Version = uint32(connectionVersion) + 1
rowsUpdated, err := w.Update(ctx, &updatedConnection, []string{"Version"}, nil, db.WithVersion(&connectionVersion))

Loading…
Cancel
Save