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:
parent
2a6291c2fd
commit
5999fc69d8
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user