Commit f3c9ad13 authored by Alexandre Pere's avatar Alexandre Pere
Browse files

Removes Remote leak

parent 893ca573
name = "remote-leak"
version = "0.2.0"
authors = ["Alexandre Péré <>"]
edition = "2018"
futures-preview = "0.3.0-alpha.17"
liborchestra = { path = "../liborchestra"}
\ No newline at end of file
#![feature(async_await, futures_api)]
extern crate liborchestra;
use liborchestra::ssh;
use std::alloc::System;
static GLOBAL: System = System;
fn main(){
use futures::executor::block_on;
for i in 1..100{
async fn connect_and_ls() {
let profile = ssh::config::SshProfile{
name: "test".to_owned(),
hostname: Some("".to_owned()),
user: Some("apere".to_owned()),
port: None,
proxycommand: Some("ssh -A -l apere localhost -W localhost:22".to_owned()),
let remote = ssh::RemoteHandle::spawn(profile).unwrap();
let output = remote.async_exec("echo kikou".to_owned()).await.unwrap();
println!("Executed and resulted in {:?}", String::from_utf8(output.stdout).unwrap());
println!("{}", i);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment