From cab5f0fc9f217a577ad7614e5539e0d0315279b1 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 1 Aug 2019 09:05:26 -0700 Subject: move tcpstream assignment to its own function The recent move to take ownership of TcpStream exposed an issue with the `handshake` method: if the stream is non-blocking then it may take several attempts to handshake, but only the first one is able to transfer ownership. My initial thought was just to make the TcpStream a required parameter to `new`, but we have some tests that work with known hosts and the ssh agent that don't require a tcpstream. I'm going to review those and see if there is a cleaner overall solution, but that will likely require more substantial API changes. For now, the simplest change is to add a separate `set_tcp_stream` function to make the stream ownership transfer explicit and distinct from the handshake. Refs: https://github.com/alexcrichton/ssh2-rs/issues/17 --- libssh2-sys/libssh2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libssh2-sys') diff --git a/libssh2-sys/libssh2 b/libssh2-sys/libssh2 index 6d70b26..1bbb96e 160000 --- a/libssh2-sys/libssh2 +++ b/libssh2-sys/libssh2 @@ -1 +1 @@ -Subproject commit 6d70b26ab602d112707890608455caf29ec9a358 +Subproject commit 1bbb96e41bf298fb525e5bcf64566f43e8fd4c85 -- cgit v1.2.3