mirror of
https://github.com/tucnak/telebot
synced 2024-11-11 01:10:39 +00:00
Handlers will be executed in separate goroutines.
This commit is contained in:
parent
ad382bdb6b
commit
7acb52c3cf
@ -20,6 +20,6 @@ func (b *Bot) Serve(msg *Message) {
|
|||||||
_, value, _ := b.tree.LongestPrefix(request)
|
_, value, _ := b.tree.LongestPrefix(request)
|
||||||
|
|
||||||
if endpoint, ok := value.(Handler); ok {
|
if endpoint, ok := value.(Handler); ok {
|
||||||
endpoint(Context{b, msg})
|
go endpoint(Context{b, msg})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user