Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(query): always close client.conn in cancelQuery (issue ClickHouse…
…#405) When the server closes the connection unexpectedly, the client will call cancelQuery (e.g. when client.packet fails). In client.cancelQuery, if client.flushBuf has data to flush, it will return a non-nil error and return early without calling conn.Close. This prevents the chpool from removing the client after client.Do and leaves the client.conn in a bad state such that future writes will always fail with a "broken pipe" error.
- Loading branch information