From db0937dd1a51bd8f15ff93ba058ad363c495f1a4 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 4 Oct 2020 11:45:49 +0200 Subject: [PATCH] Remove useless comments in SRT --- stream/srt/srt.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stream/srt/srt.go b/stream/srt/srt.go index b3927b7..96ca78d 100644 --- a/stream/srt/srt.go +++ b/stream/srt/srt.go @@ -63,22 +63,22 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet // Wait for new connection s, err := sck.Accept() if err != nil { - // log.Println("Error occurred while accepting request:", err) - continue // break // FIXME: should not break here + // Something wrong happenned + continue } if !streamStarted { + // The first connection is the streamer go acceptCallerSocket(s, clientDataChannels, &listeners, authBackend, forwardingChannel) streamStarted = true } else { + // All following connections are viewers dataChannel := make(chan Packet, 2048) clientDataChannels[listeners] = dataChannel listeners++ go acceptListeningSocket(s, dataChannel) } } - - sck.Close() } func acceptCallerSocket(s *srtgo.SrtSocket, clientDataChannels []chan Packet, listeners *int, authBackend auth.Backend, forwardingChannel chan Packet) {