/// <summary> /// Method handles situation when server stops /// </summary> /// <param name="clients">Collection of connected clients</param> public void StopHandling(List <ClientInfo> clients) { WaitStop(); string farewellMessage = "The server has been shut down. Please, try to connect later"; if (Broadcast != null) { Broadcast(farewellMessage, Stub); } socketHandler.CloseConnections(clients); }