Do not disconnect random hosts which are explicit set with ConnectTo
This commit is contained in:
parent
bdab2e15f6
commit
606948116d
2 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,6 @@ void terminate_connection(connection_t *c, bool report) {
|
|||
c->edge = NULL;
|
||||
|
||||
/* Run MST and SSSP algorithms */
|
||||
|
||||
graph();
|
||||
|
||||
/* If the node is not reachable anymore but we remember it had an edge to us, clean it up */
|
||||
|
@ -253,7 +252,7 @@ static void periodic_handler(void *data) {
|
|||
if(i++ != r)
|
||||
continue;
|
||||
|
||||
if(!c->outgoing || !c->node || c->node->edge_tree->count < 2)
|
||||
if(!c->outgoing || c->outgoing->keep_it || !c->node || c->node->edge_tree->count < 2)
|
||||
break;
|
||||
|
||||
logger(DEBUG_CONNECTIONS, LOG_INFO, "Autodisconnecting from %s", c->name);
|
||||
|
|
|
@ -122,6 +122,7 @@ typedef struct listen_socket_t {
|
|||
|
||||
typedef struct outgoing_t {
|
||||
char *name;
|
||||
bool keep_it;
|
||||
int timeout;
|
||||
splay_tree_t *config_tree;
|
||||
struct config_t *cfg;
|
||||
|
|
Loading…
Reference in a new issue