Server Disconnect from Proxy

Discussion in 'BungeeCord Plugin Development' started by BiastGaming, May 21, 2016.

  1. Hey,
    I want a method or any ideas on how I would check if a server has become offline from the proxy and therefore notify all online staff that server has disconnected from the network. Ideally I don't want to be checking 24/7 only when a server is disconnected should it broadcast
     
  2. You can make a HashMap and put in it the Server name and his status.
    And a Scheduler which check the Server status and when the Server is Offline can you broadcast it.
     
  3. Nice idea, but a scheduler for every server? ;) Imagine a network with more than 1000 servers.

    I would use Java sockets. Evertime a server is shutting down, he sends information to the socket and then it broadcasts it on the network
     
    • Like Like x 1
  4. But I want it just on the proxy, how would I detect shutting down
     
  5. I think that it don't work with proxy only. It would be a nice idea for the next BungeeCord update to implement that :D
     
  6. Or we could all be smart and use ServerInfo#ping... simply check if the throwable in the callback is null, and if so, the server is online.