andrerpena/chatjs — pull request #28 by pioterj (2013-10-03 20:09:35+00:00)
Title: Make sure users are retrieved before starting long polling

Currently when using the long polling adapter there can be a situation where long polling returns a message before the user list is retrieved. In such case there is an error in JavaScript saying "Cannot find the other user in the list" that make the chat unusable until the page is refreshed. I fixed this issue by starting long polling only after the list of users is returned from the server.