相同资源重试问题#88
Open
shinelp100 wants to merge 4 commits intoNikaple:masterfrom
Open
Conversation
Owner
|
没有理解为何这么做就可以修复你所说的问题,参考: #81 |
Author
|
与#81这个问题还有一定差别,如 <img src="http://cdn.a.com/img/1.png">
<img src="http://cdn.a.com/img/1.png">
<img src="http://cdn.a.com/img/1.png">
<img src="http://cdn.a.com/img/1.png">配置如下: domain: ['cdn.a.domain', 'cdn.b.domain', 'cdn.c.domain'],
// 可选,最大重试次数,默认 3 次
maxRetryCount: 3,doc.addEventListener('error', errorHandler, true) 监听到四次,只有一张图片会进行重载,但是retryTimesProp++已经自增到4了,如果重载域名是cdn.a.com ---失败---> cdn.b.com,cdn.b.com也加载失败,会尝试cdn.c.domain重载,但是此时会被收集器中currentCollector[retryTimesProp] = 4;拦截了,导致后续重载失败。 我理解应该不被拦截,因为浏览对于四张相同url的图,他只会请求一次,我们应该针对请求次数而不是报错次数去拦截。 |
Owner
|
如果确认可以修复这个问题的话,麻烦在 e2e/fixture 文件夹下补充一下对应的用例~ 刚在本地试了下目前的代码并不能修复你提出的问题 |
added 2 commits
April 2, 2022 23:06
Author
|
已在 e2e/fixture 文件夹下添加 multiple-imgs-load.html文件 |
|
这个问题还是 open 状态吗?是否合并 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
相同图片资源加载失败后maxRetryCount一直自增,导致大于设定值,造成第一次重载失败后,不再重试的问题。
nodeProject^error^-^ResourseError^1648631743919^https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7^-^-^-^-^-^-^-^-;pcsearch^info^-^customize^1648631744048^-^-^-^-^-^{"assets_retry_url":"/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","assets_retry_status":"success","retryTimes":12,"failed":["https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7","https://n2.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7", "https://n11.xxx.com/g10/M05/44/34/vIYBAFm1IgmAAQjPAAQ8qUEKjsM415_200_200_1.png?78a7"],"succeeded":[]}^-^-^-正常在重载
https://n11.xxx.com/...失败后会重载https://n12.xxx.com/...