1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 19:42:20 +00:00

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

View File

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