Description
I was looking at TransportConnection and I noticed that the pendingStop flag was a normal boolean but not always accessed inside of a synchronized block. This is an issue because multiple threads might be checking this flag (such as when the inactivity monitor runs). The starting flag has the same issue. Both of these booleans can be converted to AtomicBoolean which will simplify things and guarantee thread visibility on change.