Massive extinction event for waitForExecutionDone; try to stop projects view switching from crashing

This commit is contained in:
lee-at-zoo-corp
2025-03-21 19:33:59 -04:00
parent 4c9851efbf
commit fbefff490c
19 changed files with 113 additions and 106 deletions

View File

@ -305,6 +305,8 @@ class EngineConnection extends EventTarget {
)
isUsingConnectionLite: boolean = false
timeoutToForceConnectId: ReturnType<typeof setTimeout> = setTimeout(() => {}, 3000)
constructor({
engineCommandManager,
url,
@ -595,7 +597,7 @@ class EngineConnection extends EventTarget {
// Sometimes the remote end doesn't report the end of candidates.
// They have 3 seconds to.
setTimeout(() => {
this.timeoutToForceConnectId = setTimeout(() => {
if (that.initiateConnectionExclusive()) {
console.warn('connected after 3 second delay')
}
@ -1192,6 +1194,8 @@ class EngineConnection extends EventTarget {
)
}
disconnectAll() {
clearTimeout(this.timeoutToForceConnectId)
if (this.websocket?.readyState === 1) {
this.websocket?.close()
}