|
Lines 502-517
client_global_request_reply(int type, u_
Link Here
|
| 502 |
static void |
502 |
static void |
| 503 |
server_alive_check(void) |
503 |
server_alive_check(void) |
| 504 |
{ |
504 |
{ |
| 505 |
if (packet_inc_alive_timeouts() > options.server_alive_count_max) { |
505 |
if (compat20) { |
| 506 |
logit("Timeout, server not responding."); |
506 |
if (packet_inc_alive_timeouts() > options.server_alive_count_max) { |
| 507 |
cleanup_exit(255); |
507 |
logit("Timeout, server not responding."); |
| 508 |
} |
508 |
cleanup_exit(255); |
| 509 |
packet_start(SSH2_MSG_GLOBAL_REQUEST); |
509 |
} |
| 510 |
packet_put_cstring("keepalive@openssh.com"); |
510 |
packet_start(SSH2_MSG_GLOBAL_REQUEST); |
| 511 |
packet_put_char(1); /* boolean: want reply */ |
511 |
packet_put_cstring("keepalive@openssh.com"); |
| 512 |
packet_send(); |
512 |
packet_put_char(1); /* boolean: want reply */ |
| 513 |
/* Insert an empty placeholder to maintain ordering */ |
513 |
packet_send(); |
| 514 |
client_register_global_confirm(NULL, NULL); |
514 |
/* Insert an empty placeholder to maintain ordering */ |
|
|
515 |
client_register_global_confirm(NULL, NULL); |
| 516 |
} else { |
| 517 |
packet_send_ignore(0); |
| 518 |
packet_send(); |
| 519 |
} |
| 515 |
} |
520 |
} |
| 516 |
|
521 |
|
| 517 |
/* |
522 |
/* |
|
Lines 572-578
client_wait_until_can_do_something(fd_se
Link Here
|
| 572 |
* event pending. |
577 |
* event pending. |
| 573 |
*/ |
578 |
*/ |
| 574 |
|
579 |
|
| 575 |
if (options.server_alive_interval == 0 || !compat20) |
580 |
if (options.server_alive_interval == 0) |
| 576 |
tvp = NULL; |
581 |
tvp = NULL; |
| 577 |
else { |
582 |
else { |
| 578 |
tv.tv_sec = options.server_alive_interval; |
583 |
tv.tv_sec = options.server_alive_interval; |