Skip to content

Commit

Permalink
fix: incorrect worldstatus list allocation (#38)
Browse files Browse the repository at this point in the history
WorldStatus list is incorrectly initialized. All the entries in the
list points to the same address. This makes a buggy update for world's
status. This issue is fixed here.
  • Loading branch information
myungjin authored Jul 19, 2024
1 parent fb8a6a7 commit aa230a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion multiworld/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ def _monitor_thread(self):

if not empty:
logger.debug(f"name: {world}, rank: {rank}, world size: {size}")
self._myworlds[world] = (store, rank, [WorldStatus()] * size)
self._myworlds[world] = (
store,
rank,
[WorldStatus() for i in range(size)],
)

# update tick for all the worlds that I belongs to
broken_worlds = set()
Expand Down

0 comments on commit aa230a4

Please sign in to comment.