Skip to content

Commit 4884993

Browse files
committed
update README.md
1 parent 506cbe3 commit 4884993

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ func main() {
9797

9898
// AllocHoldToken allocates a HoldToken, the shutdown keeper tracks every tokens' status that it allocates.
9999
// once shutdown process is triggered, shutdown keeper will wait for every token to be released.
100-
go func(token shutdownKeeper.HoldToken) {
101-
defer token.Release()
102-
103-
// RunTask is used to run a task that may block this goroutine until the context is canceled.
104-
RunTask(ctx)
105-
}(keeper.AllocHoldToken())
100+
go func(token shutdownKeeper.HoldToken) {
101+
defer token.Release()
102+
103+
// RunTask is used to run a task that may block this goroutine until the context is canceled.
104+
RunTask(token.Context())
105+
}(keeper.AllocHoldToken())
106106

107107
server := &http.Server{
108108
Addr: ":8011",

0 commit comments

Comments
 (0)