friends-of-reactphp / mysql

Async MySQL database client for ReactPHP.
MIT License
334 stars 66 forks source link

Consistently emit close event after quit even if server rejects #189

Closed clue closed 11 months ago

clue commented 11 months ago

This changeset ensures we consistently emit a close event after a quit() call even if the server rejects. This is more of an edge case I've encountered while working on support for multiple connections as discussed in #175, so I figured it makes sense to properly close the connection in case the server does not already do this as usually expected.

Follow-up PRs will build on top of this to use dedicated open and close events as discussed in #147 and support multiple connections as discussed in #175.

Builds on top of #187

clue commented 11 months ago

Rebased to fix merge conflict now that #188 is in :shipit: