7677787980818283848586
} if (stderr != null) { stderr.close(); } if (channel != null) { channel.disconnect(); } } } protected static int consumeOutputSyncAndReturnExitCode(Channel channel, InputStream stdout, PrintStream stdoutConsumer, InputStream stderr,
113114115116117118119120121122123
waitForAck(in); sendFileToRemote(localFile, in, out); } finally { if (channel != null) { channel.disconnect(); } } } private void doMultipleTransfer() throws IOException, JSchException {
133134135136137138139140141142143
Directory current = (Directory) i.next(); sendDirectory(current, in, out); } } finally { if (channel != null) { channel.disconnect(); } } } private void sendDirectory(Directory current,
101102103104105106107108109110111
sendAck(out); startRemoteCpProtocol(in, out, localFile); } finally { if (channel != null) { channel.disconnect(); } } log("done\n"); }
333334335336337338339340341342343
uploadLatch.await(10, TimeUnit.MINUTES); } catch (Exception e) { LOGGER.warn("Failed to upload. Will attempt downloading distribution via maven."); } finally { if (channel != null) { channel.disconnect(); } } } private byte[] readFile(String path) {