(Please just reply to the list)

comments in line


Le 27/07/2017 à 10:25, Christoph John a écrit :
> One question that comes to my mind after looking at our code: there is
> a Boolean attribute get/set on the IoSession in various places
> (SessionConnector.QFJ_RESET_IO_CONNECTOR). We get/set this from
> different locations and threads. But we neither synchronize on the
> IoSession nor the get/set of the attribute. So IMHO it could happen
> that the attribute is set to a different value than actually expected,
> triggering unexpected behaviour.
> I only searched briefly but could not find anything in the MINA code
> that makes getting/setting the attribute thread-safe.

Attributes within a session are not protected : it's up to you to make
sure they are not modified concurently. Now, for a boolean, using an
AtomicBoolean would certainly help.

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org

Reply via email to