Skip to content

Bug in examples/graceful_shutdown_long_polling #285

@MikhailLipanin

Description

@MikhailLipanin

💬 Telego version

dec2a1e

👾 Issue description

In telego/examples/graceful_shutdown_long_polling/main.go file, there is an example of graceful shutdown.

In goroutine, that handles stop signal, there is a break statement inside select->for. But this break is referred to inner statement select, not for, as expected:

for len(updates) > 0 {
	select {
	case <-stopCtx.Done():
		break
	case <-time.After(time.Microsecond * 100):
		// Continue
	}
}

⚡️ Expected behavior

No response

🧐 Code example

Metadata

Metadata

Assignees

Labels

👾 BugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions