Fix deadlocks in event listener system; closes pterodactyl/panel#2298

Fixes deadlocks that occurred when events were registered while other events were being unsubscribed and data was being flooded to these listeners. A complete mess, I hate this code, it is going to break again, but jesus I'm so tired.
This commit is contained in:
Dane Everitt
2020-09-11 23:01:54 -07:00
committed by GitHub
parent 45bcb9cd68
commit b2eebcaf6d
7 changed files with 57 additions and 32 deletions

View File

@@ -118,7 +118,7 @@ func FromConfiguration(data *api.ServerConfigurationResponse) (*Server, error) {
return nil, err
} else {
s.Environment = env
go s.StartEventListeners()
s.StartEventListeners()
}
// Forces the configuration to be synced with the panel.