Skip to content

Commit

Permalink
GUACAMOLE-600: Update telnet protocol to send timeout to common socke…
Browse files Browse the repository at this point in the history
…t code.
  • Loading branch information
necouchman committed May 25, 2024
1 parent 1cdda6d commit 7d0b76b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/protocols/telnet/telnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static telnet_t* __guac_telnet_create_session(guac_client* client) {
guac_telnet_client* telnet_client = (guac_telnet_client*) client->data;
guac_telnet_settings* settings = telnet_client->settings;

int fd = guac_socket_tcp_connect(settings->hostname, settings->port);
int fd = guac_socket_tcp_connect(settings->hostname, settings->port, settings->timeout);

/* Open telnet session */
telnet_t* telnet = telnet_init(__telnet_options, __guac_telnet_event_handler, 0, client);
Expand Down Expand Up @@ -511,7 +511,8 @@ void* guac_telnet_client_thread(void* data) {
settings->wol_wait_time,
GUAC_WOL_DEFAULT_CONNECT_RETRIES,
settings->hostname,
settings->port)) {
settings->port,
settings->timeout)) {
guac_client_log(client, GUAC_LOG_ERROR, "Failed to send WOL packet or connect to remote server.");
return NULL;
}
Expand Down

0 comments on commit 7d0b76b

Please sign in to comment.