You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing query returns context.Canceled in most cases when context canceled.
However, we see use of closed network connection rarely when context canceled during querying or executing.
For error handling purposes, it is preferable to always return context.Canceled.
…sql-driver#1615)
### Description
Check if the context is canceled when failed to TLS handshake.
fix: go-sql-driver#1614
### Checklist
- [x] Code compiles correctly
- [x] Created tests which fail without the change (if possible)
- [x] All tests passing
- [x] Extended the README / documentation, if necessary
- [x] Added myself / the copyright holder to the AUTHORS file
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added Nao Yokotsuka to the contributors list for improved project
documentation.
- **Bug Fixes**
- Enhanced error handling in the TLS handshake process to better manage
cancellation requests, improving connection responsiveness.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Issue description
Executing query returns context.Canceled in most cases when context canceled.
However, we see
use of closed network connection
rarely when context canceled during querying or executing.For error handling purposes, it is preferable to always return context.Canceled.
similar issue: #1078
Example code
It seems that use of closed network connection occurs when ctx is canceled at a specific timing while the connection is being established.
Error log
Configuration
Driver version (or git SHA): v1.7.1 f20b286
Go version: go version go1.22.4 darwin/arm64
Server version: Mysql 8.0
Server OS: Debian GNU/Linux 11 (bullseye)
The text was updated successfully, but these errors were encountered: