File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -918,10 +918,16 @@ export class CoreNode extends EventEmitter {
918918 this . notifyParentRTTOfUpdate ( ) ;
919919 }
920920
921- this . emit ( 'failed' , {
922- type : 'texture' ,
923- error,
924- } satisfies NodeTextureFailedPayload ) ;
921+ // only emit failed outward if we've exhausted all retry attempts
922+ if (
923+ this . texture !== null &&
924+ this . texture . retryCount > this . texture . maxRetryCount
925+ ) {
926+ this . emit ( 'failed' , {
927+ type : 'texture' ,
928+ error,
929+ } satisfies NodeTextureFailedPayload ) ;
930+ }
925931 } ;
926932
927933 private onTextureFreed : TextureFreedEventHandler = ( ) => {
Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ export class SubTexture extends Texture {
137137 } ;
138138
139139 private onParentTxFailed : TextureFailedEventHandler = ( target , error ) => {
140+ //decrement with 1 because in the failed state it will do +1 again.
141+ this . retryCount = this . parentTexture . retryCount - 1 ;
140142 this . forwardParentTxState ( 'failed' , error ) ;
141143 } ;
142144
You can’t perform that action at this time.
0 commit comments