Mitch0S / gamma

Gamma. A multi-client, multi-server Minecraft proxy implemented in Python
13 stars 1 forks source link

Event Functions called multiple times for a single event #3

Closed Mitch0S closed 2 years ago

Mitch0S commented 2 years ago

Events such as on_player_ping are called more than once as there is no sync between the upstream and downstream threads to determine if the event has already been called. There are two ways to fix this:

  1. Remove the call function for the events from one thread function (Only have it in upstream rather than both downstream and upstream)

  2. Have a variable such as self.on_ping_event_called of type bool as a connection between the two threads to determine if one of the two threads has already called the event

Mitch0S commented 2 years ago

This will be fixed tomorrow

Mitch0S commented 2 years ago

Fixed