mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 00:26:56 +00:00
Batch mDNS discovery callbacks to every 500 ms
This commit is contained in:
parent
9536c3f8c8
commit
e6f4247ae8
@ -142,13 +142,13 @@ ServiceFinder.prototype.onReceive_ = function(info) {
|
||||
byIP[ptr] = true;
|
||||
}.bind(this));
|
||||
|
||||
// Ping! Something new is here. Only update every 25ms.
|
||||
// Ping! Something new is here. Only update every 500ms.
|
||||
if (!this.callback_pending_) {
|
||||
this.callback_pending_ = true;
|
||||
setTimeout(function() {
|
||||
this.callback_pending_ = undefined;
|
||||
this.callback_();
|
||||
}.bind(this), 25);
|
||||
}.bind(this), 500);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user