Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
fix dict reuse between _EventInternalMetadata instances
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Feb 7, 2020
1 parent b70053a commit 9594c24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ class _EventInternalMetadata(object):
__slots__ = ["_dict"]

def __init__(self, internal_metadata_dict: JsonDict):
self._dict = internal_metadata_dict
# we have to copy the dict, because it turns out that the same dict is
# reused. TODO: fix that
self._dict = dict(internal_metadata_dict)

outlier = DictProperty("outlier") # type: bool
out_of_band_membership = DictProperty("out_of_band_membership") # type: bool
Expand Down

0 comments on commit 9594c24

Please sign in to comment.