mike-jumper commented on code in PR #415:
URL: https://github.com/apache/guacamole-server/pull/415#discussion_r1145480284


##########
src/protocols/telnet/telnet.c:
##########
@@ -424,9 +424,25 @@ static telnet_t* __guac_telnet_create_session(guac_client* 
client) {
                 NI_NUMERICHOST | NI_NUMERICSERV)))
             guac_client_log(client, GUAC_LOG_DEBUG, "Unable to resolve host: 
%s", gai_strerror(retval));
 
-        /* Connect */
-        if (connect(fd, current_address->ai_addr,
-                        current_address->ai_addrlen) == 0) {
+        fd_set fdset;
+        FD_ZERO(&fdset);
+        FD_SET(fd, &fdset);
+
+        struct timeval timeout_tv;
+        timeout_tv.tv_sec = settings->timeout;
+        timeout_tv.tv_usec = 0;
+
+        connect(fd, current_address->ai_addr, current_address->ai_addrlen);

Review Comment:
   How does this work together with `select()`? Is it OK to ignore the return 
value of `connect()`?



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