Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump websocket connect timeout #382

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export const BaseSettingsDefinition = {
'The maximum amount of time in milliseconds to wait for the websocket connection to open (including custom open handler)',
type: 'number',
default: 10_000,
validate: validator.integer({ min: 500, max: 30_000 }),
validate: validator.integer({ min: 500, max: 180000 }),
Copy link
Contributor

Choose a reason for hiding this comment

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

not opposed to this per se, but also not sure this is correct, discussion: https://chainlink-core.slack.com/archives/C02FM5ZP2TC/p1738019106947369

},
CACHE_POLLING_MAX_RETRIES: {
description:
Expand Down
2 changes: 1 addition & 1 deletion src/transports/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class WebSocketTransport<
return {
// Called when the WS connection is opened
open: async (event: WebSocket.Event) => {
logger.debug(`Opened websocket connection. (event type ${event.type})`)
logger.info(`Opened websocket connection. (event type ${event.type})`)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an important type of event that is good to set at info level since it should be infrequent and manages the entire stream of data

Copy link
Contributor

Choose a reason for hiding this comment

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

there are certain EAs (eg: coinmetrics) that require reconnection to change the subscription set. I'm not sure this is the correct approach. Maybe in the specific EA if you find this valuable to log at info, stick a separate log in the specific open handler?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a good suggestion - will implement locally

if (this.config.handlers.open) {
await this.config.handlers.open(connection, context)
logger.debug('Successfully executed connection opened handler')
Expand Down
Loading