Skip to content

Commit

Permalink
Fix bug where active session ID is sometimes not persisted (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz authored Jan 24, 2024
1 parent b762df1 commit 2f57a6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wavesrv/pkg/sstore/dbops.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2f57a6e

Please sign in to comment.