Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Waterfall's methods to add and remove servers #484

Closed
Sneakometer opened this issue May 27, 2021 · 3 comments
Closed

Use Waterfall's methods to add and remove servers #484

Sneakometer opened this issue May 27, 2021 · 3 comments
Assignees
Labels
v: 4.X This pull should be included in the 4.0 release

Comments

@Sneakometer
Copy link

Sneakometer commented May 27, 2021

Related to PaperMC/Waterfall#645
So basically there is a slim chance breaking the TMap in the Configuration class of Waterfall everytime a server is added/removed at the same time another thread is accessing it. Waterfall intruduced a lock object aswell as dedicated addServer() and removeServer() methods to mitigate this issue. I request CloudNet to use these methods, if they are found, or else fall back using the map to still keep the BungeeCord compatibility.

Reasons for inclusion into the CloudNet code base:

Planned audience:

  • All Cloudnet + Waterfall users

Preview of pseudo code :

  • Check if addServer() and removeServer() methods are present using reflections
  • If yes, use them to add and remove Servers in the Bridge Module
  • If no, just do it the old way
@derklaro
Copy link
Member

Implemented in branch better-service-to-proxy-register please test and give feedback :) Thank you

@Sneakometer
Copy link
Author

Now running 1 week in production without any issues. I think it's safe to merge.

@derklaro derklaro added status: accepted v: 4.X This pull should be included in the 4.0 release labels Jun 10, 2021
@derklaro derklaro self-assigned this Oct 30, 2021
@derklaro
Copy link
Member

derklaro commented Nov 8, 2021

Was implemented in 86c49a5 and will be available in the next release. Thank you for your report :)

@derklaro derklaro closed this as completed Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

No branches or pull requests

2 participants