@Override
    public void disconnectedClient(PyroClient client) {
        if (VERBOSE)
            System.out.println("disconnectedClient=" + client);

        SocksAttachment attachment = client.attachment();

        if (attachment != null && attachment.target != null
                && !attachment.target.isDisconnected()) {
            attachment.target.shutdown();
            attachment.target.attach(null);
            client.attach(null);
        }
    }