meteor/meteor — pull request #653 by awwx (2013-01-30 18:36:53+00:00)
Title: Detect update available on first stream connection.

Between flights in PHL :)

Meteor has a small race condition: it is possible (if rather unlikely) that in between delivering the app html and the browser making the first stream connection, the server might have reloaded its code. Since the stream client uses the first connection to get the server_id in the welcome message, it won't notice that it's running outdated code.

The race condition has greater impact when using an app cache. The browser will normally start up with cached code, which means that most of the time a returning user after a code update will be out of date at the time of the first stream connection.

This PR includes the server_id in the Meteor runtime config (which is included in the HTML delivered to the browser). The client is then able to detect that a code update is available on the first stream connection.