Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

conncheck: use unix.Poll instead of syscall.Read #1456

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

Open
methane wants to merge 3 commits into go-sql-driver:master
base: master
Choose a base branch
Loading
from methane:checkconn-poll

Conversation

Copy link
Member

@methane methane commented Jul 6, 2023

Description

connCheck() now uses Poll() to check netConn readability.
When some event is happened, try reading from the connection and log error as much as possible.

Fix #1392

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

Copy link

coveralls commented Jul 6, 2023
edited
Loading

Coverage Status

coverage: 82.55% (+0.02%) from 82.534% when pulling 77038d6 on methane:checkconn-poll into 5d4a831 on go-sql-driver:master.


var errUnexpectedRead = errors.New("unexpected read from socket")
"golang.org/x/sys/unix"
Copy link
Member

@julienschmidt julienschmidt Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on Windows?

dolmen reacted with thumbs up emoji
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it doesn't, as current implementation too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@julienschmidt julienschmidt julienschmidt left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v1.10.0
Development

Successfully merging this pull request may close these issues.

"closing bad idle connection: unexpected read from socket" errors on MySQL 8.0.24

AltStyle によって変換されたページ (->オリジナル) /