Github user mike-jumper commented on a diff in the pull request:

    
https://github.com/apache/incubator-guacamole-server/pull/93#discussion_r119491146
  
    --- Diff: src/protocols/ssh/ssh.c ---
    @@ -318,11 +323,18 @@ void* ssh_client_thread(void* data) {
     
         /* While data available, write to terminal */
         int bytes_read = 0;
    +    int timeout = 0;
         for (;;) {
     
             /* Track total amount of data read */
             int total_read = 0;
     
    +        /* Set up return value for keepalives */
    +        int alive = 0;
    --- End diff --
    
    I recommend cleaning this up a bit:
    
    It's unnecessarily wide scope (it's only used within that `if` block), 
unnecessary initialization (this initial zero value will always be overwritten 
by the call to `libssh2_keepalive_send()`), and an unnecessary variable (you 
can just as easily simply call `libssh2_keepalive_send()` within the `if` that 
checks the return value).


---
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