Skip to content

Conversation

zjj
Copy link
Contributor

@zjj zjj commented Jan 8, 2022

there's no need to set conn's readline if CheckConnLiveness is false,
and the ReadTimeout shall works with rawConn.Read inside conncheck.

Description

don't do SetReadDeadline CheckConnLiveness is false,
and use readtimeout deadline for conncheck.

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

@zjj
Copy link
Contributor Author

zjj commented Jan 8, 2022

@julienschmidt @vmg

see also: #964 #1052
ref: 8056f2c and 6844171

@zjj zjj force-pushed the master branch 2 times, most recently from 9837d81 to 488faf7 Compare January 8, 2022 18:36
there's no need to set conn's readline if CheckConnLiveness is false,
and the ReadTimeout shall work with rawConn.Read inside conncheck.
buffer.fill will do SetReadDeadline if needed
@methane methane merged commit 0d7b91a into go-sql-driver:master Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants