summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2020-01-18 16:17:13 -0800
committerWez Furlong <wez@wezfurlong.org>2020-01-18 16:17:13 -0800
commita22780feb63945bd549735e17b48074b4d7b1419 (patch)
treeab3841d0066b04a130c9b8ce0b9c322d104e560c
parentbd8e51d16299580408888773774d70c4d8743f4b (diff)
downloadssh2-rs-a22780feb63945bd549735e17b48074b4d7b1419.zip
Restore deleted Send impl
Heh, I removed this by accident at the last minute before submitting the PR to the CI... restore it!
-rw-r--r--src/session.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/session.rs b/src/session.rs
index 90a0333..442deaa 100644
--- a/src/session.rs
+++ b/src/session.rs
@@ -68,6 +68,11 @@ pub(crate) struct SessionInner {
tcp: Option<TcpStream>,
}
+// The compiler doesn't know that it is Send safe because of the raw
+// pointer inside. We know that the way that it is used by libssh2
+// and this crate is Send safe.
+unsafe impl Send for SessionInner {}
+
/// An SSH session, typically representing one TCP connection.
///
/// All other structures are based on an SSH session and cannot outlive a