mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Change livedata to reflect new, single method name
This commit is contained in:
@@ -214,7 +214,7 @@ var Connection = function (url, options) {
|
||||
// Any message counts as receiving a pong, as it demonstrates that
|
||||
// the server is still alive.
|
||||
if (self._heartbeat) {
|
||||
self._heartbeat.pongReceived();
|
||||
self._heartbeat.messageReceived();
|
||||
}
|
||||
|
||||
if (msg === null || !msg.msg) {
|
||||
@@ -242,11 +242,8 @@ var Connection = function (url, options) {
|
||||
options.onDDPVersionNegotiationFailure(description);
|
||||
}
|
||||
}
|
||||
else if (msg.msg === 'ping') {
|
||||
if (options.respondToPings)
|
||||
self._send({msg: "pong", id: msg.id});
|
||||
if (self._heartbeat)
|
||||
self._heartbeat.pingReceived();
|
||||
else if (msg.msg === 'ping' && options.respondToPings) {
|
||||
self._send({msg: "pong", id: msg.id});
|
||||
}
|
||||
else if (msg.msg === 'pong') {
|
||||
// noop, as we assume everything's a pong
|
||||
|
||||
@@ -508,17 +508,13 @@ _.extend(Session.prototype, {
|
||||
// the client is still alive.
|
||||
if (self.heartbeat) {
|
||||
Fiber(function () {
|
||||
self.heartbeat.pongReceived();
|
||||
self.heartbeat.messageReceived();
|
||||
}).run();
|
||||
}
|
||||
|
||||
if (self.version !== 'pre1' && msg_in.msg === 'ping') {
|
||||
if (self._respondToPings)
|
||||
self.send({msg: "pong", id: msg_in.id});
|
||||
if (self.heartbeat)
|
||||
Fiber(function () {
|
||||
self.heartbeat.pingReceived();
|
||||
}).run();
|
||||
return;
|
||||
}
|
||||
if (self.version !== 'pre1' && msg_in.msg === 'pong') {
|
||||
|
||||
Reference in New Issue
Block a user