Skip to content

[Game Server] Fix vote counting concurrency & captain disconnect during knife round #397

@Flegma

Description

@Flegma

Summary

Vote system has race conditions on player disconnect, and captain disconnect during knife round creates deadlock.

Findings

  • VoteSystem.cs — expectedVoteCount changes when player disconnects but _votes dictionary not updated. Votes resolve on stale counts.
  • PlayerDisconnected.cs — captain removed during knife round while KnifeSystem waiting for captain input. No fallback.

Impact

Votes resolve incorrectly. Knife round stuck waiting for disconnected captain.

Suggested Fix

Synchronize vote counting on disconnect. Auto-assign new captain when current captain disconnects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions