Skip to content

Commit c85629b

Browse files
Remove limit for sockets per connection to fix "Premature close" error + prepare patch release (#217)
* Remove limit for sockets per connection to fix "Premature close" error Signed-off-by: Levko Kravets <[email protected]> * Prepare release 1.7.1 (patch) Signed-off-by: Levko Kravets <[email protected]> --------- Signed-off-by: Levko Kravets <[email protected]>
1 parent a86f828 commit c85629b

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release History
22

3+
## 1.7.1
4+
5+
- Fix "Premature close" error which happened due to socket limit when intensively using library
6+
(databricks/databricks-sql-nodejs#217)
7+
38
## 1.7.0
49

510
- Fixed behavior of `maxRows` option of `IOperation.fetchChunk()`. Now it will return chunks

lib/connection/connections/HttpConnection.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ export default class HttpConnection implements IConnectionProvider {
4949
private getAgentDefaultOptions(): http.AgentOptions {
5050
const clientConfig = this.context.getConfig();
5151

52-
const cloudFetchExtraSocketsCount = clientConfig.useCloudFetch ? clientConfig.cloudFetchConcurrentDownloads : 0;
53-
5452
return {
5553
keepAlive: true,
56-
maxSockets: 5 + cloudFetchExtraSocketsCount,
5754
keepAliveMsecs: 10000,
55+
maxSockets: Infinity, // no limit
5856
timeout: this.options.socketTimeout ?? clientConfig.socketTimeout,
5957
};
6058
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@databricks/sql",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"description": "Driver for connection to Databricks SQL via Thrift API.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)