Skip to content

Commit

Permalink
fix: Fix go routine issue when create a node (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
helayoty committed Nov 10, 2022
1 parent 6ae157a commit 5444096
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cmd/virtual-kubelet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,11 @@ func main() {
return err
}

go func() {
err := node.Run(ctx)
if err != nil {

}
}()
<-ctx.Done()
return ctx.Err()
err = node.Run(ctx)
if err != nil {
return err
}
return nil
}

if err := run(ctx); err != nil {
Expand Down

0 comments on commit 5444096

Please sign in to comment.