mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
add timeout mechanism
This commit is contained in:
@@ -45,9 +45,16 @@ export class ObserveHandle {
|
||||
this.nonMutatingCallbacks = nonMutatingCallbacks;
|
||||
|
||||
this.initialAddsSent = new Promise(resolve => {
|
||||
return this.initialAddsSentResolver = () => {
|
||||
const ready = () => {
|
||||
resolve();
|
||||
this.initialAddsSent = Promise.resolve();
|
||||
}
|
||||
|
||||
const timeout = setTimeout(ready, 30000)
|
||||
|
||||
this.initialAddsSentResolver = () => {
|
||||
ready();
|
||||
clearTimeout(timeout);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user