Skip to content

[ServerProject] Concurrency problem when too many bots #3

@Akwd22

Description

@Akwd22

The game bug when there is more than ~3 bots because they connect to the server at the very same time.

The bug is located between the thread which listens to the connections and the thread which connects the bots.

  • Temporary fix: put a sleep before connecting each bot.
  • Permanent fix: delay the connection of a new bot until listenConnection() has said to continue (block after accept(), unblock before accept()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions