Skip to content

Commit

Permalink
fixbug
Browse files Browse the repository at this point in the history
  • Loading branch information
jin06 committed Dec 14, 2021
1 parent ce8e0d8 commit b6a74eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cmd/server/app/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ func NewCommand() (cmd *cobra.Command) {
RunEvent()
var nodeCtx context.Context
var err error
if nodeCtx, err = RunNode(context.Background()); err != nil {
ctx := context.Background()
if nodeCtx, err = RunNode(ctx); err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
event.Event(event2.NewInfoNode("Run node success"))
if err = RunConsole(context.Background()); err != nil {
if err = RunConsole(ctx); err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/app/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

// RunConsole run gin
func RunConsole() (err error) {
err = console.Run(context.Background())
func RunConsole(c context.Context) (err error) {
err = console.Run(c)
return
}

0 comments on commit b6a74eb

Please sign in to comment.