Remove useless comments in SRT
This commit is contained in:
parent
5cdb5282ef
commit
db0937dd1a
|
@ -63,22 +63,22 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel chan Packet
|
||||||
// Wait for new connection
|
// Wait for new connection
|
||||||
s, err := sck.Accept()
|
s, err := sck.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// log.Println("Error occurred while accepting request:", err)
|
// Something wrong happenned
|
||||||
continue // break // FIXME: should not break here
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if !streamStarted {
|
if !streamStarted {
|
||||||
|
// The first connection is the streamer
|
||||||
go acceptCallerSocket(s, clientDataChannels, &listeners, authBackend, forwardingChannel)
|
go acceptCallerSocket(s, clientDataChannels, &listeners, authBackend, forwardingChannel)
|
||||||
streamStarted = true
|
streamStarted = true
|
||||||
} else {
|
} else {
|
||||||
|
// All following connections are viewers
|
||||||
dataChannel := make(chan Packet, 2048)
|
dataChannel := make(chan Packet, 2048)
|
||||||
clientDataChannels[listeners] = dataChannel
|
clientDataChannels[listeners] = dataChannel
|
||||||
listeners++
|
listeners++
|
||||||
go acceptListeningSocket(s, dataChannel)
|
go acceptListeningSocket(s, dataChannel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sck.Close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func acceptCallerSocket(s *srtgo.SrtSocket, clientDataChannels []chan Packet, listeners *int, authBackend auth.Backend, forwardingChannel chan Packet) {
|
func acceptCallerSocket(s *srtgo.SrtSocket, clientDataChannels []chan Packet, listeners *int, authBackend auth.Backend, forwardingChannel chan Packet) {
|
||||||
|
|
Loading…
Reference in New Issue