You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had long-running applications run out of file descriptors and while debugging noticed that srt-rs will leak a socket if async connect fails.
I worked around that by implementing Drop for ConnectFuture in dholroyd@5e6adce
I can submit that as a PR if the approach is good. I had originally planned to implement Drop for SrtSocket, but that looked much more difficult due to lots of existing usage needing it to be Copy.
The text was updated successfully, but these errors were encountered:
The ConnectFuture move out of scope and gets dropped once it returns a successful SrtAsyncStream. So this approach will close a socket while it's still in use. Instead, I think closing it once there is an error in poll() is a better approach.
I've had long-running applications run out of file descriptors and while debugging noticed that srt-rs will leak a socket if async connect fails.
I worked around that by implementing
Drop
forConnectFuture
in dholroyd@5e6adceI can submit that as a PR if the approach is good. I had originally planned to implement
Drop
forSrtSocket,
but that looked much more difficult due to lots of existing usage needing it to beCopy
.The text was updated successfully, but these errors were encountered: