fix so that parodus can be killed if it connection fail loop

This commit is contained in:
Bill Williams
2019-11-01 14:14:18 -07:00
parent 846b0588c2
commit 81d8f59bbd
2 changed files with 6 additions and 5 deletions

View File

@@ -17,8 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- provide signal handlers so we shut down properly when INCLUDE_BREAKPAD active
- send status code and reason in close message
- Add pause/resume heartBeatTimer
- parodus event handler to listen to interface_down and interface_up event
- Pause connection retry during interface_down event
- fix so that parodus can be killed, even if in a connection fail loop
## [1.0.2] - 2019-02-08
- Refactored connection.c and updated corresponding unit tests

View File

@@ -556,7 +556,7 @@ int keep_trying_to_connect (create_connection_ctx_t *ctx,
{
int rtn;
while (true)
while (!g_shutdown)
{
set_extra_headers (ctx);
@@ -571,6 +571,7 @@ int keep_trying_to_connect (create_connection_ctx_t *ctx,
return false; //find_server again
// else retry
}
return false;
}
@@ -615,8 +616,8 @@ int createNopollConnection(noPollCtx *ctx)
set_current_server (&conn_ctx);
if (keep_trying_to_connect (&conn_ctx, &backoff_timer))
break;
// retry dns query
if (g_shutdown)
return nopoll_false;
// If interface down event is set, stop retry
// and wait till interface is up again.
if(get_interface_down_event()) {
@@ -629,6 +630,7 @@ int createNopollConnection(noPollCtx *ctx)
((header_info_t *)(&conn_ctx.header_info))->conveyHeader = getWebpaConveyHeader();
ParodusInfo("Received reconnect_reason as:%s\n", reconnect_reason);
}
// retry dns query
}
if(conn_ctx.current_server->allow_insecure <= 0)