aiomysql
aiomysql copied to clipboard
refactor: close connection on error
Port the solution from PyMySQL: https://github.com/PyMySQL/PyMySQL/pull/540
Might solve #340.
Codecov Report
Merging #358 into master will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #358 +/- ##
=======================================
Coverage 93.17% 93.17%
=======================================
Files 9 9
Lines 1129 1129
Branches 161 161
=======================================
Hits 1052 1052
Misses 54 54
Partials 23 23
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 298d2f1...51d83d4. Read the comment docs.
Any clue why the tests failed for py3.5.3?
Other than that the tests and port looks good. Have you tested it normally by having it connected to a maria db, restarting it and seeing if the close packets are now understood?
Really odd that it failed with python 3.5.3, i'll look into it.
I have not yet tested this against mariadb, i'll do a simple script to replicate the scenario and test it tomorrow.
Please merge this
thanks for the PR, I intend to patch the original issue in #660. I'm keeping this open to review the tests later on.
Thanks for fixing this issue!
i'll keep this open for now until i've had time to review and probably merge the tests