]> git.meshlink.io Git - meshlink/commitdiff
Check that num_unreachable > 0
authorAaron Krebs <aaron.krebs@everbase.net>
Tue, 29 Jul 2014 13:49:45 +0000 (15:49 +0200)
committerAaron Krebs <aaron.krebs@everbase.net>
Tue, 29 Jul 2014 13:49:45 +0000 (15:49 +0200)
src/net.c

index 651c2a3ebb3becb2d940dc6b229d4d302ae0480c..c63fbacd756cf2f73720e9bc44742ebf53be87ee 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -195,8 +195,7 @@ static void periodic_handler(event_loop_t *loop, void *data) {
                                }
                                break;
                        }
-               //} else if(nc > autoconnect) {
-               } else {
+               } else if (num_unreachable > 0) {
                        /* Min number of connections established. Now try
                           to connect to some unreachable nodes to attempt
                           to heal possible partitions.