PlayPen / playpen-core

Server management and load balancing framework
http://playpen.io
MIT License
33 stars 7 forks source link

LocalCoordinator and Server have cyclic dependencies #14

Closed hugmanrique closed 6 years ago

hugmanrique commented 6 years ago

The LocalCoordinator#hashCode() method calculates the hashcode of the servers map which contains a collection of Servers for which their hashcode will be calculated. The issue is that the Server class keeps a reference to its LocalCoordinator and will call the hashcode method forever.

StackOverflowException stacktrace

redxdev commented 6 years ago

Odd that I've never seen this before. I'll change Server.hashCode to be based purely on itself and LocalCoordinator.getUuid().

hugmanrique commented 6 years ago

Thank you for the quick fix! 😁