diff --git a/pkg/liqonet/conncheck/conncheck.go b/pkg/liqonet/conncheck/conncheck.go index 543392c76e..100a7d4aac 100644 --- a/pkg/liqonet/conncheck/conncheck.go +++ b/pkg/liqonet/conncheck/conncheck.go @@ -98,7 +98,7 @@ func (c *ConnChecker) AddAndRunSender(ctx context.Context, clusterID, ip string, } c.sm.Unlock() - if err := wait.PollUntilContextCancel(ctxSender, PingInterval, true, pingCallback); err != nil { + if err := wait.PollUntilContextCancel(ctxSender, PingInterval, false, pingCallback); err != nil { klog.Errorf("conncheck sender %s stopped for an error: %s", clusterID, err) } diff --git a/pkg/liqonet/conncheck/receiver.go b/pkg/liqonet/conncheck/receiver.go index 72a877b432..88c1a237a2 100644 --- a/pkg/liqonet/conncheck/receiver.go +++ b/pkg/liqonet/conncheck/receiver.go @@ -106,7 +106,7 @@ func (r *Receiver) InitPeer(clusterID string, updateCallback UpdateFunc) error { // Run starts the receiver. func (r *Receiver) Run(ctx context.Context) { klog.Infof("conncheck receiver: started") - err := wait.PollUntilContextCancel(ctx, time.Second, true, func(ctx context.Context) (done bool, err error) { + err := wait.PollUntilContextCancel(ctx, time.Duration(0), false, func(ctx context.Context) (done bool, err error) { n, raddr, err := r.conn.ReadFromUDP(r.buff) if err != nil { klog.Errorf("conncheck receiver: failed to read from %s: %w", raddr.String(), err)