Instead of just closing the connection, and having to wait for the
reconnection to happen to send the blacklist notification, we do it
immediately when meshlink_blacklist() is called.
*/
for list_each(connection_t, c, mesh->connections) {
if(c->node == 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);
}
}
shutdown(c->socket, SHUT_RDWR);
}
}