Skip to content

Update connection.ts - operationTimeoutInSeconds is reset to default#112

Open
bogdanbrudiu wants to merge 1 commit into
amqp:masterfrom
bogdanbrudiu:patch-1
Open

Update connection.ts - operationTimeoutInSeconds is reset to default#112
bogdanbrudiu wants to merge 1 commit into
amqp:masterfrom
bogdanbrudiu:patch-1

Conversation

@bogdanbrudiu

Copy link
Copy Markdown

…value

Description

Brief description of the changes made in the PR. This helps in making better changelog
operationTimeoutInSeconds - CreatedRheaConnectionOptions is not taken into consideration and the default 60 is used

rhea-promise/lib/connection.ts line 256
this.options.operationTimeoutInSeconds = options?.operationTimeoutInSeconds ?? defaultOperationTimeoutInSeconds;

Reference to any github issues

@jeremymeng

Copy link
Copy Markdown
Collaborator

@bogdanbrudiu thanks for the PR. could you add a unit case that covers issue?

Comment thread lib/connection.ts

this.options = this._connection.options;
this.options.operationTimeoutInSeconds = options?.operationTimeoutInSeconds ?? defaultOperationTimeoutInSeconds;
this.options.operationTimeoutInSeconds = this.options?.operationTimeoutInSeconds ?? defaultOperationTimeoutInSeconds;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure which one we should take when both this._connection.options.operationTimeoutInSeconds and options.operationTimeoutInSeconds are valid.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix how Connection initializes operationTimeoutInSeconds so that it does not get reset to the default value (60s) when constructing a Connection instance.

Changes:

  • Updates the constructor’s operationTimeoutInSeconds initialization logic in lib/connection.ts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/connection.ts

this.options = this._connection.options;
this.options.operationTimeoutInSeconds = options?.operationTimeoutInSeconds ?? defaultOperationTimeoutInSeconds;
this.options.operationTimeoutInSeconds = this.options?.operationTimeoutInSeconds ?? defaultOperationTimeoutInSeconds;
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

Successfully merging this pull request may close these issues.

3 participants