Handlers will be executed in separate goroutines.

This commit is contained in:
Ian Byrd 2017-08-19 15:25:35 +03:00
parent ad382bdb6b
commit 7acb52c3cf
No known key found for this signature in database
GPG Key ID: 598F598CA3B8055F

View File

@ -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})
} }
} }