-
Notifications
You must be signed in to change notification settings - Fork 437
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
Calling cancel in SENT_ATTENTION returns false and writes debug error #545
Comments
@tvrprasad i saw it when "requestTimeout" was end. |
@ElfenLiedGH I don't quite follow. Can you please elaborate? Thanks. |
It's exactly the program logic sequence that I described in a comment for #518:
I still think that |
@chdh I agreed with you on that specific comment, which is why I opened this issue :-) |
If application calls |
I disagree. Tedious does not really throw an error, it just passes a |
in this scenario, after executing the request, state changes to |
@Hadis-Fard I don't understand. Could you provide a test case? |
@chdh in https://github.com/tediousjs/tedious/blob/master/src/connection.js#L1667 doesn't make sense to error out if the ack is received and is a valid cancel scenario, why should it throw debug error if the ack is received and request is canceled? what is the case that calling cancel doesn't throw an error? |
If the response is valid,
And in 3.2.4, the upper-layer mentioned is MARS, so its currently not applicable for tedious, need to check on Cancel Timer though. Error should be thrown only if response received is invalid.
|
@v-suhame In the case of Tedious, the "upper layer" is the application program. 3.2.4 is about events triggered by (i.e. received from) the upper layer. In our case this is the 3.2.4 is relevant for Tedious, even if MARS is not supported. The cause of the Tedious does not (And in our case, the response is always "structurally valid". Otherwise the database connection is closed.) |
This will be fixed via #846. 😬 |
🎉 This issue has been resolved in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This should not be an error and we should return true. User has no way to know that the connection is in SENT_ATTENTION state and even otherwise it should not be error.
The text was updated successfully, but these errors were encountered: