Skip to content

Commit

Permalink
Liqonet: connchecker latency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 authored and adamjensenbot committed Nov 3, 2023
1 parent afb83a7 commit 9e2a5df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/liqonet/conncheck/conncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/liqonet/conncheck/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e2a5df

Please sign in to comment.