diff --git a/pkg/bbgo/graceful_shutdown.go b/pkg/bbgo/graceful_shutdown.go index 5f6be55a0..4ea578f1f 100644 --- a/pkg/bbgo/graceful_shutdown.go +++ b/pkg/bbgo/graceful_shutdown.go @@ -30,5 +30,6 @@ func OnShutdown(ctx context.Context, f ShutdownHandler) { func Shutdown(shutdownCtx context.Context) { logrus.Infof("shutting down...") - defaultIsolation.gracefulShutdown.Shutdown(shutdownCtx) + isolatedContext := GetIsolationFromContext(shutdownCtx) + isolatedContext.gracefulShutdown.Shutdown(shutdownCtx) }