Skip to content
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

Fix idle connection check for TLS connections #951

Merged
merged 2 commits into from
Mar 29, 2023
Merged

Conversation

jkaflik
Copy link
Contributor

@jkaflik jkaflik commented Mar 29, 2023

Summary

When using TLS connection, the idle connection is not correctly checked for liveness. It's because tls.Conn does not implement syscall.Conn which is used to read raw from socket:
https://github.com/ClickHouse/clickhouse-go/blob/main/conn_check.go#L31

Add a additional type cast to detect TLS conn and get underlying connection.

Changelog: Fix idle connection liveness check for TLS connections

@jkaflik jkaflik merged commit 49f0e42 into main Mar 29, 2023
@jkaflik jkaflik deleted the conn-check-fix-tls branch May 5, 2023 16:18
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.

4 participants