log timeout

This commit is contained in:
anhtvcengroup
2023-04-21 09:48:30 +07:00
parent 6f93f07666
commit 53f65a20dd
3 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
{
"files.associations": {
"sstream": "cpp"
"sstream": "cpp",
"*.ipp": "cpp"
}
}

View File

@@ -652,10 +652,12 @@ namespace openvpn {
restart_wait_timer.cancel();
if (client_options->server_poll_timeout_enabled())
{
OPENVPN_LOG("Client expires after in " << client_options->server_poll_timeout() << "...");
server_poll_timer.expires_after(client_options->server_poll_timeout());
server_poll_timer.async_wait([self=Ptr(this), gen=generation](const openvpn_io::error_code& error)
{
OPENVPN_ASYNC_HANDLER;
OPENVPN_LOG("server_poll_callback error " << *error);
self->server_poll_callback(gen, error);
});
}

View File

@@ -317,7 +317,7 @@ namespace openvpn {
}
openvpn_io::post(io_context, [error_code, completion=std::move(completion)]() {
OPENVPN_LOG("GO TO POST ");
OPENVPN_LOG("GO TO POST ");
completion(error_code);
});
});