mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 16:18:05 +03:00
Close remote handles when closing stream.
This commit is contained in:
@@ -166,6 +166,8 @@ public class RemoteFile
|
|||||||
public void close()
|
public void close()
|
||||||
throws IOException {
|
throws IOException {
|
||||||
flush();
|
flush();
|
||||||
|
// Close handle
|
||||||
|
RemoteFile.this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -269,6 +271,8 @@ public class RemoteFile
|
|||||||
throw new SFTPException("Unexpected packet: " + res.getType());
|
throw new SFTPException("Unexpected packet: " + res.getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Close handle
|
||||||
|
RemoteFile.this.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user