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

fix(wallet): fix aggressive disconnects in wallet connectivity #3807

Merged

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Feb 8, 2022

Description

  • Disconnects the wallet peer only if the pool is unable to create a new RPC session.
  • Clear the pool when disconnecting, so that requests for a client session will wait
  • Immediately return an error if dialling a peer that is banned

Motivation and Context

Observed the wallet continuously disconnecting and reconnecting to base node, resulting in many of these message:
Outbound messaging protocol failed for peer xxxxx: IO Error: 5e5731a0/4: connection is closed

This is not a confirmed fix for the issue, because it is difficult to reproduce, but I suspect the problem was not clearing the
pool in wallet connectivity when disconnecting was causing disconnect to be called whenever a peer session was requested by the monitor etc., sometimes timed in such a way that it would disconnect the new connection that was just established, and that would continue indefinitely.

How Has This Been Tested?

Manually, switching base nodes, stop base node while connected then restart

delta1
delta1 previously approved these changes Feb 8, 2022
Copy link
Contributor

@delta1 delta1 left a comment

Choose a reason for hiding this comment

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

LGTM, untested

@aviator-app aviator-app bot added the mq-failed label Feb 8, 2022
@stringhandler stringhandler merged commit 86e0154 into tari-project:development Feb 17, 2022
sdbondi added a commit to sdbondi/tari that referenced this pull request Feb 17, 2022
* development: (28 commits)
  fix(wallet): fix aggressive disconnects in wallet connectivity (tari-project#3807)
  chore: honor decimals in ERC20 (tari-project#3809)
  chore: add icons to applications (tari-project#3812)
  fix: daily test (tari-project#3815)
  ci: improvements to macos pkg (tari-project#3824)
  ci: cargo test speedups (tari-project#3843)
  feat: add persistence of transaction cancellation reason to wallet db (tari-project#3842)
  fix: update RFC links and README (tari-project#3675) (tari-project#3839)
  chore: change NodeIdentity debug (tari-project#3817)
  fix(dan): include state_root in node hash (tari-project#3836)
  feat(cli): resize terminal height (tari-project#3838)
  feat(validator-node): initial state sync implementation (partial) (tari-project#3826)
  feat: update console wallet tui (tari-project#3837)
  feat: resize base node terminal on startup (tari-project#3827)
  feat(wallet): add grpc method for setting base node (tari-project#3828)
  chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 in /applications/tari_web_extension_example (tari-project#3832)
  chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 in /applications/tari_collectibles/web-app (tari-project#3833)
  chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 in /applications/tari_web_extension (tari-project#3834)
  chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 in /applications/launchpad/gui-vue (tari-project#3831)
  chore(deps): bump follow-redirects from 1.14.4 to 1.14.8 in /integration_tests (tari-project#3829)
  ...
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