mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 18:15:39 +01:00
Ensure only 1 server saves config value at a time.
This commit is contained in:
parent
a64c21da8b
commit
279162d720
@ -63,10 +63,13 @@ public class ProtocolDetectorService implements Runnable {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Save Server
|
||||
servers.put(key, serverPing.getVersion().getProtocol());
|
||||
// Ensure we're the only ones writing to the config
|
||||
synchronized (Via.getPlatform().getConfigurationProvider()) {
|
||||
servers.put(key, serverPing.getVersion().getProtocol());
|
||||
}
|
||||
// Save
|
||||
Via.getPlatform().getConfigurationProvider().saveConfig();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user