-
Notifications
You must be signed in to change notification settings - Fork 516
[KODO-15365] 修复偶发性无法停止任务的 BUG #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
(chunkInfo: ChunkInfo) => this.uploadChunk(chunkInfo), | ||
async (chunkInfo: ChunkInfo) => { | ||
if (this.aborted) return | ||
await this.uploadChunk(chunkInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIP: 好像 await 没啥作用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有作用,当 catch 的时候需要抛错误给 Pool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跟直接 return 有啥区别
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
if (this.aborted) { | ||
pool.abort() | ||
throw new Error('pool is aborted') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIP: 丑陋是真的丑陋
问题
abort
可能失败的问题 #539原因分析
pool
中未执行到的uploadChuck