Skip to content

Commit

Permalink
Close PoET server in standalone preset on shutdown (#5080)
Browse files Browse the repository at this point in the history
## Motivation
Followup to #5074. This fixes the `TestAdminEvents` test failing on windows.

## Changes
- Add missing `Close` on shutdown for poet server

## Test Plan
<!-- Please specify how these changes were tested
(e.g. unit tests, manual testing, etc.) -->

## TODO
<!-- This section should be removed when all items are complete -->
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed
- [x] Update [changelog](../CHANGELOG.md) as needed
  • Loading branch information
fasmat committed Sep 25, 2023
1 parent d58607b commit 878ed5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -987,13 +987,13 @@ func (app *App) launchStandalone(ctx context.Context) error {
if err != nil {
return fmt.Errorf("init poet server: %w", err)
}
app.log.With().Warning("lauching poet in standalone mode", log.Any("config", cfg))
app.log.With().Warning("launching poet in standalone mode", log.Any("config", cfg))
app.eg.Go(func() error {
if err := srv.Start(ctx); err != nil {
app.log.With().Error("poet server failed", log.Err(err))
return err
}
return nil
return srv.Close()
})
return nil
}
Expand Down

0 comments on commit 878ed5d

Please sign in to comment.