How We Handle Blockchain Reconnects In web3js
Too Long; Didn't Read
There’s no inbuilt reconnect functionality in Web3JS to handle blockchain disconnects or restarts. Usually, when there is a connection drop, NodeJS service needs to be restarted as well to connect to the blockchain again. In this article, we’ll learn how to handle the connection between NodeJS and blockchain in production. The method described below works for Web3J version 1.0.0-beta, but it should be good for the stable 1.2* versions as well.