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

fix non-blocking mode listening and blocking mode option parsing #24

Closed iSchluff closed 3 years ago

iSchluff commented 3 years ago

Fixes accept in non-blocking mode and makes options["blocking"] = "0" work like it should.

Previously when the option was set to "0" s.blocking would still end up being true, so all examples are actually using blocking mode.

Non-blocking mode was only enabled if the option was not set at all which produced the error encountered in #8 when trying to listen because the epoll_wait was waiting for the wrong condition.

jeoliva commented 3 years ago

Good catch. Thanks!