]> git.meshlink.io Git - meshlink/blobdiff - src/net.c
Improve logging of connection attemps.
[meshlink] / src / net.c
index 9a062f41482536f4f1d7fc4e1051e8240bae9ea6..35cfc6502a6b12091fd36ed8d9353aa38765b3ce 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -52,7 +52,9 @@ static const int default_interval = 60;
   - Check if we need to retry making an outgoing connection
 */
 void terminate_connection(meshlink_handle_t *mesh, connection_t *c, bool report) {
-       logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name);
+       if(c->status.active) {
+               logger(mesh, MESHLINK_INFO, "Closing connection with %s", c->name);
+       }
 
        if(c->node && c->node->connection == c) {
                if(c->status.active && mesh->meta_status_cb) {