@Override
    public void close()
    {
        if (isNotReady())
        {
            return;
        }
        
        for (Client c : clients)
        {
            c.close();
        }

        try
        {
            onClose();
        }
        catch (Exception e)
        {
            // ignore
        }

        clients.clear();
        closed = true;
    }