-
-
Notifications
You must be signed in to change notification settings - Fork 327
Fix abort error when using custom request #74
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
Changes Unknown when pulling 9abb8a9 on leiming:master into ** on react-component:master**. |
Changes Unknown when pulling dcca820 on leiming:master into ** on react-component:master**. |
According to me, custom request should support |
Thank you for replying me, @benjycui If we will support to customizing I think that |
you can help us modify the api doc, the and IMO, this PR is acceptable, more robust check before call. |
Nope, connection should be close when we don't need them. e.g. we are uploading a big file(50MB?), then we destroy Upload. We should destroy connection, otherwise, this will occupy the network. |
I think this PR should be closed. @shepherdwind
cc @leiming , and you can add a warning, if the return value of customRequest is invalid. |
ok,check and warning before call is the way too,that means we think abort is not a optional interface |
@paranoidjk sometimes, we can swallow an error, but I don't think this error should be swallowed. So, just let it crash and print a warning, for this problem can be found easily while developing. |
@paranoidjk @benjycui , I agree on the error should not be swallowed since |
The request in
reqs[uid]
may not get a standard instance ofrequest
while callingcustomRequest
function which returns a Promise.Checking
abort
function before being called could solve this scenario.