Closed xiazhvera closed 11 months ago
Attention: 6 lines
in your changes are missing coverage. Please review.
Comparison is base (
c475ef1
) 82.41% compared to head (ed5a700
) 82.34%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Debatable: I feel slightly uneasy because of passing a "half-dead" connection
object into callbacks. But this approach seems safe with the current implementation, so I don't have strong opinion about it.
Talked to Bret about the issue. The caller should be responsible to track the connection
reference. If the caller have released the connection reference, the caller should never use connection
even if the connection
is from the callback.
As Igor mentioned, passing a "half-dead" connection object into callbacks is hard to handle. However, if we pass a null here, it has a risk to crash the user. (If the caller forget to handle NULL here). Besides, it also breaks the contract that the user “should never use the connection if they have release it.” if they have to do a NULL check here.
We should make a rule to avoid expose the object in callbacks in the future implementation.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.