ClickHouse / clickhouse-js

Official JS client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
225 stars 27 forks source link

remove request listeners synchronously #124

Closed mshustov closed 1 year ago

mshustov commented 1 year ago

closes https://github.com/ClickHouse/clickhouse-js/issues/123

The PR removes listeners synchronously to avoid a race condition reported in https://github.com/ClickHouse/clickhouse-js/issues/123. While running https://github.com/ClickHouse/clickhouse-js/blob/main/__tests__/integration/abort_request.test.ts and other test suits, I didn't manage to reproduce the problem described in the old comment, so I removed setImmediate workaround.