Skip to content

Commit

Permalink
Fix breakage in heal due to sending incorrect Connection on Close
Browse files Browse the repository at this point in the history
networkservicemesh/cmd-forwarder-vpp#110

was broken from the use of a cached Connection in monitor to call downstream
rather than using the Connection as received in the monitorServer.Close(ctx,conn,opts...).

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
  • Loading branch information
edwarnicke committed Mar 30, 2021
1 parent 0abef45 commit 65ace68
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/networkservice/common/monitor/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ func (m *monitorServer) Request(ctx context.Context, request *networkservice.Net
}

func (m *monitorServer) Close(ctx context.Context, conn *networkservice.Connection) (*empty.Empty, error) {
<-m.executor.AsyncExec(func() {
if c, ok := m.connections[conn.GetId()]; ok {
conn = c.Clone()
}
})

_, closeErr := next.Server(ctx).Close(ctx, conn)

// Remove connection object we have and send DELETE
Expand Down

0 comments on commit 65ace68

Please sign in to comment.