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

tcp read/write timeout #30

Open
georgysavva opened this issue Jun 23, 2017 · 0 comments
Open

tcp read/write timeout #30

georgysavva opened this issue Jun 23, 2017 · 0 comments

Comments

@georgysavva
Copy link

The driver supports timeouts, it's cool. But not in the way I expected. It does conn.SetReadDeadline/conn.SetWriteDeadline on every Read/Write call and it's bad, consider following situation:
I set timeout 2 seconds. I run a query. Query response size is 1024 bytes. Database server sends response with very high latency 128 bytes every second, so every Read call returns 128 bytes and doesn't raise timeout error (1 second < 2 seconds), but i will receive whole response in 8 seconds what doesn't fit into my timeout.
The driver should call conn.SetDeadline outside the Read loop as it is done in http protocol.

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

No branches or pull requests

1 participant