Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Include buffered data when returning underlying connection (#679) #680

Closed
wants to merge 1 commit into from

Conversation

ipostelnik
Copy link

Fixes #679

When returning underlying connection and there's buffered data, return a wrapper that gives access to buffered data first.

@ghost
Copy link

ghost commented Apr 2, 2021

This PR breaks applications that use UnderlyingConn() to access the *net.TCPConn or *tls.Conn directly. An example use is setting the keep alive period.

@ipostelnik
Copy link
Author

This is better handled by adding Hijack method that doesn't break existing users of UnderlyingConn

@ipostelnik ipostelnik closed this Apr 3, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Conn.UnderlyingConn can return partially-read connection
1 participant