mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 07:52:28 +00:00
feat(multiplayer): bind admissions to durable leases
This commit is contained in:
@@ -641,7 +641,7 @@ func TestPostgreSQLConnectionReceiptsStartCompleteRelaxedCasualRoster(t *testing
|
||||
if _, err := ClaimPlayerConnection(ctx, db, binding, "connect-player-0", 0, "connect-receipt-key-0000", now.Add(4*time.Second)); !errors.Is(err, domain.ErrConflict) {
|
||||
t.Fatalf("stale connect replay err=%v, want conflict", err)
|
||||
}
|
||||
if generation, err := ClaimPlayerConnection(ctx, db, binding, "connect-player-0", 1, "reconnect-receipt-0000", now.Add(63*time.Second)); err != nil || generation != 2 {
|
||||
if generation, err := ClaimPlayerConnection(ctx, db, binding, "connect-player-0", 0, "reconnect-receipt-0000", now.Add(63*time.Second)); err != nil || generation != 2 {
|
||||
t.Fatalf("grace-boundary reconnect generation=%d err=%v", generation, err)
|
||||
}
|
||||
if err := RecordPlayerDisconnected(ctx, db, binding, "connect-player-0", 1, "stale-disconnect-0000", now.Add(64*time.Second)); !errors.Is(err, domain.ErrConflict) {
|
||||
|
||||
Reference in New Issue
Block a user