Skip to content

Commit

Permalink
fix: agent cmd panic
Browse files Browse the repository at this point in the history
  • Loading branch information
roryye committed Jul 31, 2024
1 parent eb0baf6 commit 80e7082
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"io"
"runtime"
"sync"

"github.com/deepflowio/deepflow/message/trident"
api "github.com/deepflowio/deepflow/message/trident"
Expand All @@ -31,7 +32,10 @@ import (

func (e *VTapEvent) RemoteExecute(stream api.Synchronizer_RemoteExecuteServer) error {
key := ""
var wg sync.WaitGroup
wg.Add(1)
defer func() {
wg.Wait()
service.RemoveAllFromCMDManager(key)
}()

Expand All @@ -43,6 +47,7 @@ func (e *VTapEvent) RemoteExecute(stream api.Synchronizer_RemoteExecuteServer) e

go func() {
defer func() {
wg.Done()
if r := recover(); r != nil {
buf := make([]byte, 2048)
n := runtime.Stack(buf, false)
Expand Down

0 comments on commit 80e7082

Please sign in to comment.