If there is no forwarding, drop forwarding channels

This commit is contained in:
Yohann D'ANELLO 2020-10-13 09:38:44 +02:00
parent 7325301574
commit defba52569
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@ type Options map[string][]string
func Serve(inputChannel chan srt.Packet, cfg Options) {
if len(cfg) < 1 {
// No forwarding, ignore
return
for {
<-inputChannel // Clear input channel
}
}
log.Printf("Stream forwarding initialized")