This means we read less data (yay), but more importantly it means that
if the last entry contained custom EJSON types, we don't try to parse
them. This code gets called synchronously from the first
Meteor.Collection constructor, which can legitimately be before your
EJSON.addType call.
Fixes#2018.
The previous version of openssl (1.0.1f) was vulnerable to the 'heartbleed'
attack, though Meteor did not use this version in a way that opened
it to attack. The build of openssl here is used only for mongod, not
node, and was used only as a client, not a server. But lets upgrade anyway.
Before this, if the runner decided to stop (eg, because mongod is
crashing too much) while waiting for file change, it would crash due to
an attempt to wait within a fiber. Fixing that bug by adding an inFiber
would then lead to the process just not exiting, because nothing stops
the wait-specific future.
Doing so reveals a deadlock in the stop code (which causes self-test to
fail, yay). Fix it by trying harder to not stop the (all or app) runner
until after the app runner has processed the "hey you should stop"
return false from onRunEnd.
Now any plugin can request that its files be treated as "templates" by
setting an isTemplate flag.
(This API is just as supported as you'd expect based on the fact that
you still can't access it without calling a function which starts with
"_transitional_".)
Tested by renaming leaderboard.js to a.js and confirming that it still
works (and that it *doesn't* if templating does not set isTemplate).
If you happen to introduce a circular require into the stack, this
object will be undefined.
Instead, hang on to `require('./run-log.js')`, which is the exports
module which does get filled in later.
Use heartbeatInterval: 0 to disable heartbeats for testing.
No need to add `_internal` to the public connection API because we
can get to the internal session through the server.
Add "ping" and "pong" messages to DDP. This allows us to detect at
the DDP level when we've lost the connection.
Bump the DDP version to "pre2". Preserve backwards compatibility by
not enabling pings if the negotiated DDP version is an earlier version.
Since receiving a ping indicates that the connection is alive, one
side of the connection doesn't have to send its own pings as long as
its receiving pings from the other side. The ping interval defaults
to 30 seconds on the server and 35 seconds on the client, which means
that normally the pings go just one way (saving on bandwidth).
Increase the sockjs heartbeats from 25s to 45s, so they do not
normally fire.