users@grizzly.java.net

Do I have to remove the attribute when connection is closed.

From: LongkerDandy <longkerdandy_at_gmail.com>
Date: Tue, 4 Nov 2014 17:18:49 +0800

Hi

I've a TCP server, which using Conenction and Attribute to save user's auth
information.
Like this:


private static final Attribute<Integer> ATTR_AUTH =
Grizzly.DEFAULT_ATTRIBUTE_BUILDER.createAttribute("auth");
public static void setAuthState(Connection connection, int authState) {
        ATTR_AUTH.set(connection, authState);
    }


And I saw some strange logs, seems something when a client connected, it
already have the attribute.
I can't locate the problem, and I wondered do I need to remove the
attributes when a connection is closed.

Regards
LongkerDandy