Bug 2251 gave us the ability to tell shadowers and "normal" connections apart. This give us the option to fix this corner case: 1. A user starts a session and connects 2. A shadower connects and a notification pops up (CORRECT) 3. The user disconnects, but the shadower remains. 4. The user reconnects an a notification pops up (INCORRECT) This is because we merely look at the number of the connections right now, not their type.
Is this a duplicate of bug 5737?
Consider getting rid of connection counting altogether and only rely on the shadower connection event to trigger a warning. While it would not get rid of the race, it would make it less likely to happen.
This got fixed as part of bug 37/bug 5737.