From 2f57a6e067e3b627020fbd30cddd474c8483b114 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Wed, 24 Jan 2024 11:32:48 -0800 Subject: [PATCH] Fix bug where active session ID is sometimes not persisted (#248) --- wavesrv/pkg/sstore/dbops.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wavesrv/pkg/sstore/dbops.go b/wavesrv/pkg/sstore/dbops.go index 9f408585..aa5d8a3a 100644 --- a/wavesrv/pkg/sstore/dbops.go +++ b/wavesrv/pkg/sstore/dbops.go @@ -1056,6 +1056,7 @@ func getNextId(ids []string, delId string) string { } func SwitchScreenById(ctx context.Context, sessionId string, screenId string) (*ModelUpdate, error) { + SetActiveSessionId(ctx, sessionId) txErr := WithTx(ctx, func(tx *TxWrap) error { query := `SELECT screenid FROM screen WHERE sessionid = ? AND screenid = ?` if !tx.Exists(query, sessionId, screenId) {