Browse Source

Don't say milliseconds when you mean seconds

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274359 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
b65d193a6c
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      docs/manual/OptionalTasks/sshexec.html
  2. +4
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java

+ 1
- 1
docs/manual/OptionalTasks/sshexec.html View File

@@ -99,7 +99,7 @@ for more information. This task has been tested with jsch-0.1.3.</p>
<tr>
<td valign="top">timeout</td>
<td valign="top">Stop the command if it doesn't finish within the
specified time (given in seconds). Defaults to 0 which means &quot;wait forever&quot;.</td>
specified time (given in milliseconds). Defaults to 0 which means &quot;wait forever&quot;.</td>
<td align="center" valign="top">No</td>
</tr>
</table>


+ 4
- 4
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java View File

@@ -80,7 +80,7 @@ import com.jcraft.jsch.Session;
public class SSHExec extends SSHBase {

private String command = null; // the command to execute via ssh
private int maxwait = 0; // units are milliseconds, default is 0=infinite
private long maxwait = 0; // units are milliseconds, default is 0=infinite
private Thread thread = null; // for waiting for the command to finish

private String output_property = null; // like <exec>
@@ -110,14 +110,14 @@ public class SSHExec extends SSHBase {
*
* @param timeout The new timeout value in seconds
*/
public void setTimeout(int timeout) {
maxwait = timeout * 1000;
public void setTimeout(long timeout) {
maxwait = timeout;
}

/**
* If used, stores the output of the command to the given file.
*
* @param maxwait The new maxwait value
* @param output The file to write to.
*/
public void setOutput(File output) {
output_file = output;


Loading…
Cancel
Save