mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:24:07 +02:00
Work around Script.clearTimeout() occasionally failing
This commit is contained in:
parent
4b175e98e9
commit
8ab261d1b0
1 changed files with 7 additions and 0 deletions
|
@ -301,6 +301,8 @@
|
|||
var errorMessage;
|
||||
|
||||
if (autoPlayTimer) { // Cancel auto-play.
|
||||
// FIXME: Once in a while Script.clearTimeout() fails.
|
||||
// [DEBUG] [hifi.scriptengine] [3748] [agent] stopTimer -- not in _timerFunctionMap QObject(0x0)
|
||||
Script.clearTimeout(autoPlayTimer);
|
||||
autoPlayTimer = null;
|
||||
}
|
||||
|
@ -327,6 +329,11 @@
|
|||
|
||||
// Random delay to help reduce collisions between AC scripts.
|
||||
Script.setTimeout(function () {
|
||||
// Guard against Script.clearTimeout() in play() not always working.
|
||||
if (isPlayingRecording) {
|
||||
return;
|
||||
}
|
||||
|
||||
recording = Entity.find();
|
||||
if (recording) {
|
||||
log("Play persisted recording " + recording.recording);
|
||||
|
|
Loading…
Reference in a new issue