Skip to content

webhook: panic: close of closed channel #584

@archimed-shaman

Description

@archimed-shaman

gopkg.in/telebot.v3 v3.1.3

Error:

panic: close of closed channel

goroutine 49 [running]:
gopkg.in/telebot%2ev3.(*Webhook).waitForStop(...)
	/go/pkg/mod/gopkg.in/[email protected]/webhook.go:155
gopkg.in/telebot%2ev3.(*Webhook).Poll.func1(0x0?)
	/go/pkg/mod/gopkg.in/[email protected]/webhook.go:142 +0x34
created by gopkg.in/telebot%2ev3.(*Webhook).Poll
	/go/pkg/mod/gopkg.in/[email protected]/webhook.go:141 +0x1d9

Looks like this happens because stop channel is closed in two places:

telebot/bot.go

Line 222 in fbd35f2

close(stop)

close(stop)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions