mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
clean code
This commit is contained in:
@@ -456,7 +456,7 @@ export class Connection {
|
||||
this.ready && this.readyDeps.changed();
|
||||
},
|
||||
stop() {
|
||||
this.connection._sendQueued({ msg: 'unsub', id: id });
|
||||
this.connection._send({ msg: 'unsub', id: id });
|
||||
this.remove();
|
||||
|
||||
if (callbacks.onStop) {
|
||||
@@ -1031,13 +1031,6 @@ export class Connection {
|
||||
this._stream.send(DDPCommon.stringifyDDP(obj));
|
||||
}
|
||||
|
||||
// Always queues the call before sending the message
|
||||
// Used, for example, on subscription.[id].stop() to make sure a "sub" message is always called before an "unsub" message
|
||||
// https://github.com/meteor/meteor/issues/13212
|
||||
_sendQueued(obj) {
|
||||
this._send(obj, true);
|
||||
}
|
||||
|
||||
// We detected via DDP-level heartbeats that we've lost the
|
||||
// connection. Unlike `disconnect` or `close`, a lost connection
|
||||
// will be automatically retried.
|
||||
|
||||
@@ -443,6 +443,9 @@ Tinytest.addAsync("livedata server - waiting for Promise", (test, onComplete) =>
|
||||
})
|
||||
);
|
||||
|
||||
/**
|
||||
* https://github.com/meteor/meteor/issues/13212
|
||||
*/
|
||||
Tinytest.addAsync('livedata server - publish cursor is properly awaited', async function (test) {
|
||||
const messages = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user