Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: send on closed channel after RECONNECT from TMI #87

Open
zephyrtronium opened this issue Nov 13, 2024 · 0 comments
Open

panic: send on closed channel after RECONNECT from TMI #87

zephyrtronium opened this issue Nov 13, 2024 · 0 comments

Comments

@zephyrtronium
Copy link
Owner

robot/robot.go

Line 124 in 3cdb7ff

err = tmi.Connect(ctx, cfg, &tmiSlog{slog.Default()}, robo.tmi.send, robo.tmi.recv)

tmi.Connect closes the recv channel when it returns, but we reuse it for subsequent connections. That causes a panic whenever we RECONNECT.

Fixing this may be slightly tricky because we don't really have ownership over the channel here and we have also passed it to tmiLoop above. Along with what I've been stuck on for #58, this makes me think we need to move more work out of config loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant