diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2009-09-16 18:58:49 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2009-09-16 18:58:49 +0000 |
commit | 72bf37c7130719ce105d73600341379389c4031f (patch) | |
tree | 7142dad3e0edd2a1b025d8ed14a43f9f235ccb42 /forward.c | |
parent | Updated version number to 2.1_rc19c. (diff) | |
download | openvpn-72bf37c7130719ce105d73600341379389c4031f.tar.xz |
Modified client to send a PUSH_REQUEST message to server 1 second
after connection initiation rather than 0 seconds after.
Successive PUSH_REQUEST messages after the first will continue to be
sent at 5 second intervals until a response is received. This tends
to speed up the client connection sequence by 4 seconds because the
first PUSH_REQUEST message is usually sent too soon and is dropped,
causing a wait of 5 seconds until the next PUSH_REQUEST message is
sent.
Version 2.1_rc19d
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4965 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'forward.c')
-rw-r--r-- | forward.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -176,6 +176,9 @@ void check_push_request_dowork (struct context *c) { send_push_request (c); + + /* if no response to first push_request, retry at 5 second intervals */ + event_timeout_modify_wakeup (&c->c2.push_request_interval, 5); } #endif @@ -204,10 +207,8 @@ check_connection_established_dowork (struct context *c) 0); } #endif - send_push_request (c); - - /* if no reply, try again in 5 sec */ - event_timeout_init (&c->c2.push_request_interval, 5, now); + /* send push request in 1 sec */ + event_timeout_init (&c->c2.push_request_interval, 1, now); reset_coarse_timers (c); } else |