Skip to content

Commit

Permalink
Fix heal after failed refresh
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <[email protected]>
  • Loading branch information
glazychev-art committed Dec 11, 2023
1 parent 821b4bc commit feb6c93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/networkservice/common/heal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/networkservicemesh/sdk/pkg/networkservice/common/begin"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/clientconn"
"github.com/networkservicemesh/sdk/pkg/networkservice/core/next"
"github.com/networkservicemesh/sdk/pkg/tools/extend"
Expand Down Expand Up @@ -68,6 +69,10 @@ func (h *healClient) Request(ctx context.Context, request *networkservice.Networ

conn, err := next.Client(ctx).Request(ctx, request, opts...)
if err != nil {
if len(request.GetConnection().GetPath().GetPathSegments()) > 1 && h.livenessCheck == nil && !loopHandle.healingStarted {
_ = begin.FromContext(ctx).Request(begin.WithReselect())
return nil, err
}
if loaded && !loopHandle.healingStarted {
eventLoopErr := h.startEventLoop(ctx, request.GetConnection())
if eventLoopErr != nil {
Expand Down

0 comments on commit feb6c93

Please sign in to comment.