Skip to content

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

@zephyrtronium

Description

@zephyrtronium

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions