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

    https://github.com/apache/trafficserver/pull/1073#discussion_r85870603
  
    --- Diff: mgmt/api/CoreAPI.cc ---
    @@ -184,21 +184,19 @@ ProxyStateSet(TSProxyStateT state, TSCacheClearT 
clear)
           ink_strlcat(tsArgs, " -k", sizeof(tsArgs));
         }
     
    -    if (strlen(tsArgs) > 0) { /* Passed command line args for proxy */
    -      ats_free(lmgmt->proxy_options);
    -      lmgmt->proxy_options = ats_strdup(tsArgs);
    -      mgmt_log("[ProxyStateSet] Traffic Server Args: '%s'\n", 
lmgmt->proxy_options);
    -    }
    +    mgmt_log("[ProxyStateSet] Traffic Server Args: '%s %s'\n", 
lmgmt->proxy_options ? lmgmt->proxy_options : "", tsArgs);
     
         lmgmt->run_proxy = true;
         lmgmt->listenForProxy();
    +    lmgmt->startProxy(tsArgs);
    --- End diff --
    
    Do you actually need to do the sleeping stuff here? Since you now call 
``LocalManager:: startProxy()`` directly, you have the return value to know 
that it succeeded. I don't think that the contract for this API needs to 
include waiting for a message.
    
    ```C
    return lmgmt->startProxy(tsArgs) ? TS_ERR_OKAY : TS_ERR_FAIL;
    ```


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to