]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.c
Also send the blacklist notification when we already have a connection.
[meshlink] / src / meshlink.c
index ee62078d8b16a55a31c363eb3d77f01fdbdb5b63..c34b24c9643f4bde69e2904877502e78c01f2b86 100644 (file)
@@ -3456,6 +3456,10 @@ static bool blacklist(meshlink_handle_t *mesh, node_t *n) {
         */
        for list_each(connection_t, c, mesh->connections) {
                if(c->node == n) {
+                       if(c->status.active) {
+                               send_error(mesh, c, BLACKLISTED, "blacklisted");
+                       }
+
                        shutdown(c->socket, SHUT_RDWR);
                }
        }