Skip to content

Commit

Permalink
remove l.Stop()
Browse files Browse the repository at this point in the history
Signed-off-by: weli-l <1289113577@qq.com>
  • Loading branch information
weli-l committed Aug 31, 2024
1 parent 6733c67 commit 1375e39
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion pkg/bpf/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func (l *BpfLoader) StartAdsMode() (err error) {
}()

if err = l.obj.Load(); err != nil {
l.Stop()
if errors.As(err, &ve) {
return fmt.Errorf("bpf Load failed: %+v", ve)

Check warning on line 85 in pkg/bpf/bpf.go

View check run for this annotation

Codecov / codecov/patch

pkg/bpf/bpf.go#L84-L85

Added lines #L84 - L85 were not covered by tests
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/bpf/bpf_kmesh_l4_workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,14 @@ func (l *BpfLoader) StartWorkloadMode() error {
}
}()

if err = l.obj.Load(); err != nil {
l.Stop()
if err = l.workloadObj.Load(); err != nil {
if errors.As(err, &ve) {
return fmt.Errorf("bpf Load failed: %+v", ve)

Check warning on line 74 in pkg/bpf/bpf_kmesh_l4_workload.go

View check run for this annotation

Codecov / codecov/patch

pkg/bpf/bpf_kmesh_l4_workload.go#L73-L74

Added lines #L73 - L74 were not covered by tests
}
return fmt.Errorf("bpf Load failed: %v", err)

Check warning on line 76 in pkg/bpf/bpf_kmesh_l4_workload.go

View check run for this annotation

Codecov / codecov/patch

pkg/bpf/bpf_kmesh_l4_workload.go#L76

Added line #L76 was not covered by tests
}

if err = l.workloadObj.Attach(); err != nil {
l.Stop()
return fmt.Errorf("bpf Attach failed, %s", err)
}
l.bpfLogLevel = l.workloadObj.SockConn.BpfLogLevel
Expand Down

0 comments on commit 1375e39

Please sign in to comment.