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

Reconnect on connection not open on send() #210

Merged
merged 5 commits into from
Aug 12, 2020

Conversation

Velenir
Copy link
Contributor

@Velenir Velenir commented Jul 24, 2020

This should attempt reconnect when Error: connection not open on send() happens
But I couldn't reproduce this exact error locally, so will need to monitor develop logs to know if it works

@alfetopito
Copy link
Contributor

Hmm anyway I can test this?

@Velenir
Copy link
Contributor Author

Velenir commented Jul 27, 2020

Hmm anyway I can test this?

I couldn't reproduce exactly the error, but.

Some success can be achieved if

  1. Make something explicit on interval, e.g. setInterval(() => console.log(web3.eth.getBalance(***)), 5000)
  2. In infura dashboard restrict access to infuraId -- easiest through enabling REQUIRE PROJECT SECRET FOR ALL REQUESTS
  3. Start bot yarn dev
  4. See how it tries to reconnect
  5. In infura dashboard allow connection
  6. Bot should reconnect

I'm a bit worried about how ongoing subscriptions would behave, but that we will need to see after the bot is deployed.

@Velenir Velenir merged commit 44099f5 into develop Aug 12, 2020
@Velenir Velenir deleted the reconnect_on_connection_not_open branch August 12, 2020 06:41
@anxolin anxolin mentioned this pull request Oct 8, 2020
anxolin added a commit that referenced this pull request Oct 8, 2020
* Reconnect on connection not open on send() (#210)

* update web3

* setup reconnect

* extend error condition

* delay reconnect attempt

* reconnect on interval

* Add xDAI compatibility (#212)

* Add xDAI contract in env

* Upgrade version of dex-js

* Go back to dex-js version 0.3

* Allow to not provide the TCR

* Add TOKEN_OVERRIDES for xDAI

* Simplify type

* Remove unused import

Co-authored-by: Velenir <Velenir@users.noreply.github.com>
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