Skip to content

Commit

Permalink
use reselect flag on requests in event factory
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Uzlov <[email protected]>
  • Loading branch information
d-uzlov committed Jun 20, 2023
1 parent e458e17 commit cf89e72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/networkservice/common/begin/event_factory.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021-2022 Cisco and/or its affiliates.
// Copyright (c) 2021-2023 Cisco and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -106,13 +106,15 @@ func (f *eventFactoryClient) Request(opts ...Option) <-chan error {
if request.GetConnection() != nil {
request.GetConnection().Mechanism = nil
request.GetConnection().NetworkServiceEndpointName = ""
request.GetConnection().State = networkservice.State_RESELECT_REQUESTED
}
}
ctx, cancel := f.ctxFunc()
defer cancel()
conn, err := f.client.Request(ctx, request, f.opts...)
if err == nil && f.request != nil {
f.request.Connection = conn
f.request.Connection.State = networkservice.State_UP
}
ch <- err
}
Expand Down

0 comments on commit cf89e72

Please sign in to comment.