Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/491#discussion_r92834958
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjTool.java
 ---
    @@ -575,9 +585,16 @@ public int execCommands(Map<String,?> props, 
List<String> commands, Map<String,?
             }
             
             // If async is set, then do it as execScript
    -        Boolean execAsync = getOptionalVal(props, PROP_EXEC_ASYNC);
    +        Boolean execAsync = getOptionalVal(props, PROP_EXEC_ASYNC, 
this.execAsync);
             if (Boolean.TRUE.equals(execAsync) && 
BrooklynFeatureEnablement.isEnabled(BrooklynFeatureEnablement.FEATURE_SSH_ASYNC_EXEC))
 {
    -            return execScriptAsyncAndPoll(props, commands, env);
    +            if 
(!props.containsKey(PROP_EXEC_ASYNC_POLLING_TIMEOUT.getName())) {
    +                return execScriptAsyncAndPoll(
    +                        MutableMap.<String, 
Object>builder().putAll(props).put(PROP_EXEC_ASYNC_POLLING_TIMEOUT.getName(), 
this.execAsyncPollingTimeout).build(),
    +                        commands,
    +                        env);
    +            } else {
    +                return execScriptAsyncAndPoll(props, commands, env);
    +            }
    --- End diff --
    
    Do the same change for `execScript` as well. Otherwise setting the config 
on the location will work only for some ssh calls (commands and not scripts).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to