Explicitly close the Engine Connection when ICE fails (#732)
This will avoid letting the stack think its ready until it times out, and will hopefully help with faster retry logic in the future Signed-off-by: Paul Tagliamonte <paul@kittycad.io>
This commit is contained in:
@ -360,6 +360,11 @@ export class EngineConnection {
|
|||||||
if (this.shouldTrace()) {
|
if (this.shouldTrace()) {
|
||||||
iceSpan.resolve?.()
|
iceSpan.resolve?.()
|
||||||
}
|
}
|
||||||
|
} else if (this.pc?.iceConnectionState === 'failed') {
|
||||||
|
// failed is a terminal state; let's explicitly kill the
|
||||||
|
// connection to the server at this point.
|
||||||
|
console.log('failed to negotiate ice connection; restarting')
|
||||||
|
this.close()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user