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
1 changed files with 3 additions and 2 deletions

View File

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