Skip to content

Commit

Permalink
Fix wrong context on app error-stop (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
evlekht authored and sk263 committed Dec 3, 2024
1 parent 6ed6df2 commit 810b96a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,21 +273,21 @@ func (a *App) Run(ctx context.Context) error {

if a.rpcClient != nil { // rpcClient will be nil, if its disabled in partner plugin config section
g.Go(func() error {
<-ctx.Done()
<-gCtx.Done()
return a.rpcClient.Shutdown()
})
}

if a.rpcServer != nil { // rpcServer will be nil, if its disabled in config
g.Go(func() error {
<-ctx.Done()
<-gCtx.Done()
a.rpcServer.Stop()
return nil
})
}

g.Go(func() error {
<-ctx.Done()
<-gCtx.Done()
return a.messenger.StopReceiver()
})

Expand Down

0 comments on commit 810b96a

Please sign in to comment.