From cabe17383101c74b35ec0c9c0d4bee88aea0e24f Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Fri, 29 Dec 2023 01:10:26 +0000 Subject: [PATCH] main Adding retry parameter --- pkg/conn/connection.go | 6 +++--- pkg/sync/syncer.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/conn/connection.go b/pkg/conn/connection.go index 55be615..5c0a17c 100644 --- a/pkg/conn/connection.go +++ b/pkg/conn/connection.go @@ -51,10 +51,10 @@ func (c *WgCtrlConnection) CreateGrpcConnection() error { "waitForReady": true, "retryPolicy": { "MaxAttempts": 2, - "InitialBackoff": ".01s", - "MaxBackoff": ".01s", + "InitialBackoff": ".1s", + "MaxBackoff": ".1s", "BackoffMultiplier": 1.0, - "RetryableStatusCodes": [ "UNAVAILABLE" ] + "RetryableStatusCodes": [ "UNAVAILABLE", "DEADLINE_EXCEEDED", "UNKNOWN" ] } }]}` diff --git a/pkg/sync/syncer.go b/pkg/sync/syncer.go index 91f6f9a..99fcbab 100644 --- a/pkg/sync/syncer.go +++ b/pkg/sync/syncer.go @@ -96,7 +96,7 @@ func (s *SyncerImpl) Sync(meshId string) error { if err == nil || err == io.EOF { succeeded = true - } else { + } else if self.GetType() == conf.PEER_ROLE { // If the synchronisation operation has failed them mark a gravestone // preventing the peer from being re-contacted until it has updated // itself