diff --git a/bot/ctx.go b/bot/ctx.go index 398c8fc..6279a8b 100644 --- a/bot/ctx.go +++ b/bot/ctx.go @@ -117,7 +117,7 @@ func Start(token string, cmd interface{}, } return func() error { - cancel() + defer cancel() return s.Wait() }, nil }