Glimesh / broadcast-box

A broadcast, in a box.
MIT License
1.42k stars 78 forks source link

Fix crash when source disconnects with connected peers #81

Closed ChaseCares closed 8 months ago

ChaseCares commented 8 months ago

I believe we want to enter this if condition when triggered from a whip state change

Logs

2024/02/20 18:09:14 Loading `.env.production`
2024/02/20 18:09:14 Running HTTP Server at `:8080`
panic: send on closed channel

goroutine 132 [running]:
github.com/glimesh/broadcast-box/internal/webrtc.WHEP.func2()
    /home/chase/projects/broadcast-box/cc_broadcast-box/internal/webrtc/whep.go:120 +0x8a
created by github.com/glimesh/broadcast-box/internal/webrtc.WHEP in goroutine 52
    /home/chase/projects/broadcast-box/cc_broadcast-box/internal/webrtc/whep.go:110 +0x373
exit status 2