Commit 347ad6f
authored
fix: service register could race and lead to multiple register calls (#1848)
### Motivation
The service cache of the bridge was not being updated in a thread safe
manner. This lead to multiple registration handler calls which at the
end results in multiple registrations on velocity / bungeecord.
### Modification
Made sure that the register and unregister calls do not race against
other incoming updates.
### Result
No races between service registration updates
##### Other context
This issue from discord is probably an example for the described race
https://discord.com/channels/325362837184577536/818777626663321671/14671773437296643161 parent 15cc106 commit 347ad6f
1 file changed
Lines changed: 10 additions & 13 deletions
File tree
- modules/bridge/impl/src/main/java/eu/cloudnetservice/modules/bridge/impl/platform
Lines changed: 10 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
212 | 209 | | |
213 | 210 | | |
214 | 211 | | |
| |||
0 commit comments