alexcrichton / ssh2-rs

Rust bindings for libssh2
https://docs.rs/ssh2
Apache License 2.0
485 stars 147 forks source link

Prevent segfault on error when closing File #274

Closed harmic closed 1 year ago

harmic commented 1 year ago

Fix for ssh2-rs issue #273.

If EAGAIN occurs, return that without clearing self.inner. If any other error occurs, or no error, clear self.inner so that Drop does not try to access the underlying libssh2 handle again.

yodaldevoid commented 1 year ago

This looks good, I just want to re-run the macOS tests to see what's going on there.

yodaldevoid commented 1 year ago

I still have no idea what is going wrong, but it feels like a fragile test.