necouchman commented on code in PR #414:
URL: https://github.com/apache/guacamole-server/pull/414#discussion_r1613889314


##########
src/common-ssh/ssh.c:
##########
@@ -453,17 +455,43 @@ guac_common_ssh_session* 
guac_common_ssh_create_session(guac_client* client,
             return NULL;
         }
 
-        /* Connect */
-        if (connect(fd, current_address->ai_addr,
-                        current_address->ai_addrlen) == 0) {
+        /* Set socket to non-blocking */
+        fcntl(fd, F_SETFL, O_NONBLOCK);
+        
+        /* Set up timeout. */
+        fd_set fdset;
+        FD_ZERO(&fdset);
+        FD_SET(fd, &fdset);
+
+        struct timeval tv;
+        tv.tv_sec = timeout;             /* 10 second timeout */

Review Comment:
   Hmmm...going to guess that was some copy-pasta, there, particularly since we 
don't usually put comments out to the right of the code...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to