Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

fix: (web3.js) clear the idle timer whenever the websocket closes#26734

Merged
steveluscher merged 1 commit intosolana-labs:masterfrom
steveluscher:cancel-idle-timer-on-close-of-websocket
Jul 25, 2022
Merged

fix: (web3.js) clear the idle timer whenever the websocket closes#26734
steveluscher merged 1 commit intosolana-labs:masterfrom
steveluscher:cancel-idle-timer-on-close-of-websocket

Conversation

@steveluscher
Copy link
Copy Markdown
Contributor

@steveluscher steveluscher commented Jul 22, 2022

Problem

If the websocket closes while there's an active idle timer, the connection can enter a corrupt state as described in solana-foundation/solana-web3.js#1106.

Summary of Changes

  • Clear the idle timer whenever the websocket connection drops.

Fixes #26665.

@steveluscher steveluscher changed the title fix: clear the idle timer whenever the websocket closes fix: (web3.js) clear the idle timer whenever the websocket closes Jul 22, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 22, 2022

Codecov Report

Merging #26734 (c23f9de) into master (ce337e0) will increase coverage by 0.0%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   solana-labs/solana#26734   +/-   ##
=======================================
  Coverage    77.4%    77.5%           
=======================================
  Files          42       42           
  Lines        2462     2465    +3     
  Branches      351      352    +1     
=======================================
+ Hits         1908     1911    +3     
  Misses        424      424           
  Partials      130      130           

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite loop in web3.js subscription handling

1 participant