Date: 2011-04-26 06:40:39 -0700 (Tue, 26 Apr 2011)
Bug: 2780176 - Logging and logging out multiple times in LCDS can cause duplicate session detected errors.
Details: When a logout was followed by an immediate login, sometimes the server would throw duplicate session detected errors. This was because when logout happened, a fire-and-forget disconnect message was sent to the server that established a new session, and if the subsequent login happened before disconnect ACK returned from the server, that would establish another session and hence the error. The fix is to insert a slight delay between disconnect and ResultEvent dispatching. This way, disconnect has a chance to return before a login is performed.