1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-23 01:32:19 +00:00

Try to fix SRT initialization

This commit is contained in:
Alexandre Iooss 2020-09-27 22:27:18 +02:00
parent 2a6291c2fd
commit 5999fc69d8
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02

View File

@ -26,9 +26,10 @@ func Serve(cfg *Options) {
s, err := sck.Accept() s, err := sck.Accept()
if err != nil { if err != nil {
log.Println("Error occured while accepting request:", err) log.Println("Error occured while accepting request:", err)
continue
} }
go func() { go func(s *sck.SrtSocket) {
buff := make([]byte, 2048) buff := make([]byte, 2048)
for { for {
n, err := s.Read(buff, 10000) n, err := s.Read(buff, 10000)
@ -42,6 +43,6 @@ func Serve(cfg *Options) {
} }
log.Printf("Received %d bytes", n) log.Printf("Received %d bytes", n)
} }
}() }(s)
} }
} }