Skip to content

Commit

Permalink
fix: fixed channel not yet close
Browse files Browse the repository at this point in the history
  • Loading branch information
totanvix committed Jun 28, 2023
1 parent f9aa397 commit 8f61fe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/hook/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
res := make(map[string]string)

err = bot.ResolveHook()

if err != nil {
res["status"] = "ERROR"
res["code"] = "internal_error"
Expand Down
1 change: 1 addition & 0 deletions utils/bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (b Bot) resolveCommand() error {

defer func() {
b.rCh <- rChannel{err: err}
close(b.rCh)
}()

data := b.getTelegramData()
Expand Down

0 comments on commit 8f61fe4

Please sign in to comment.