Haivision / srtgo

Go bindings for SRT. Advantages of SRT technology for an easy to use programming language
Mozilla Public License 2.0
185 stars 52 forks source link

Test regression: Failed to set SO_LINGER #39

Closed iSchluff closed 3 years ago

iSchluff commented 3 years ago

With srt-1.4.2 and 1.4.3 the test for setting SO_LINGER fails on one of my machines:

--- FAIL: TestNewSocketLinger (0.00s)
    srtgo_test.go:34: Could not create a srt socket
FAIL
FAIL    github.com/haivision/srtgo  0.007s
FAIL

Looking at the code it is using the native syscall.SetsockoptLinger directly on the srt socket which fails. Using the commented out version with srt_setsockopt fixes this for me, however I haven't yet tested whether the option is actually set.

https://github.com/Haivision/srtgo/blob/27de7e427495c78b590dc782943048e44abe4710/srtsocketoptions.go#L103-L113