mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 19:42:20 +00:00
Setting blocking option to 0, fix #11
This commit is contained in:
parent
5f457a1e6a
commit
a8146e7cbb
@ -66,7 +66,11 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel, webrtcChan
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to split host and port from %s", cfg.ListenAddress)
|
log.Fatalf("Failed to split host and port from %s", cfg.ListenAddress)
|
||||||
}
|
}
|
||||||
sck := srtgo.NewSrtSocket(host, port, nil)
|
|
||||||
|
options := make(map[string]string)
|
||||||
|
options["blocking"] = "0"
|
||||||
|
options["transtype"] = "live"
|
||||||
|
sck := srtgo.NewSrtSocket(host, port, options)
|
||||||
if err := sck.Listen(cfg.MaxClients); err != nil {
|
if err := sck.Listen(cfg.MaxClients); err != nil {
|
||||||
log.Fatal("Unable to listen for SRT clients:", err)
|
log.Fatal("Unable to listen for SRT clients:", err)
|
||||||
}
|
}
|
||||||
@ -77,7 +81,8 @@ func Serve(cfg *Options, authBackend auth.Backend, forwardingChannel, webrtcChan
|
|||||||
// Wait for new connection
|
// Wait for new connection
|
||||||
s, err := sck.Accept()
|
s, err := sck.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Something wrong happenned
|
// Something wrong happened
|
||||||
|
log.Println(err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user