Skip to content

Commit f5ead13

Browse files
committed
fix shutdown context and token processor config in online_uds example
Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
1 parent 5a3553c commit f5ead13

File tree

1 file changed

+2
-2
lines changed
  • examples/kv_events/online_uds

1 file changed

+2
-2
lines changed

examples/kv_events/online_uds/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func run(ctx context.Context) error {
110110
<-ctx.Done()
111111
logger.Info("Shutting down...")
112112

113-
shutdownCtx, shutdownCancel := context.WithTimeout(ctx, 30*time.Second)
113+
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), 30*time.Second)
114114
defer shutdownCancel()
115115
return httpServer.Shutdown(shutdownCtx)
116116
}
@@ -169,7 +169,7 @@ func setupEventsPool(ctx context.Context, kvBlockIndex kvblock.Index) *kvevents.
169169
zmqTopic = defaultZMQTopic
170170
}
171171

172-
tokenProcessor, err := kvblock.NewChunkedTokenDatabase(kvblock.DefaultTokenProcessorConfig())
172+
tokenProcessor, err := kvblock.NewChunkedTokenDatabase(tokenProcessorConfig())
173173
if err != nil {
174174
log.FromContext(ctx).Error(err, "failed to create token processor for events pool")
175175
os.Exit(1)

0 commit comments

Comments
 (0)