Skip to content

Incorrect requestTimeout option #1331

@Emroni

Description

@Emroni

In the documentation at https://tediousjs.github.io/tedious/api-connection.html it says options.requestTimeout can be used to change the timeout. But setting it in the connection configuration doesn't work because it gets the value from the parent config, or falls back to the default.
See /lib/tedious/connection-pool.js:40:

cfg.options.requestTimeout = this.config.requestTimeout != null ? this.config.requestTimeout : 15000

This means it can't be set with options, but does work in the parent config.

Expected behaviour:

According to documentation, this should work:

sql.connect({
    // ....
    options: {
        requestTimeout: 0,
    },
});

Actual behaviour:

sql.connect({
    // ....
    requestTimeout: 0,
});

Software versions

  • NodeJS: 14.17.6
  • node-mssql: 7.2.1
  • SQL Server: Azure Functions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions