Skip to content

Commit

Permalink
Merge pull request #77 from KlayOracle/feature-75-retry-Handshake-if-…
Browse files Browse the repository at this point in the history
…node-was-offline

Fix connection messaging
  • Loading branch information
alofeoluwafemi authored Jul 30, 2023
2 parents bc21960 + d48e4c0 commit 0a38c85
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions data-provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,12 @@ func main() {

config.Loaded.Logger.Infow("re attempting handshake to node after 60secs", "node", config.Loaded.ServiceNode)

var herr error
hConn, err = dp.HandShake() //handshake connection

hConn, herr = dp.HandShake() //handshake connection

if herr != nil {
config.Loaded.Logger.Infow("connection re-established with node", "data provider", os.Getenv("HOST_IP"), "node", config.Loaded.ServiceNode)
} else {
if err != nil {
config.Loaded.Logger.Infow("could not re-established connection with node", "data provider", os.Getenv("HOST_IP"), "node", config.Loaded.ServiceNode, "error", err)
} else {
config.Loaded.Logger.Infow("connection re-established with node", "data provider", os.Getenv("HOST_IP"), "node", config.Loaded.ServiceNode)
}

}
Expand Down

0 comments on commit 0a38c85

Please sign in to comment.