Signed-off-by: Felix Fietkau <nbd@nbd.name>
close(ctx->fd.fd);
ctx->fd.fd = -1;
ctx->poll_handle = -1;
- if (ctx->reconnect.cb)
+ if (ctx->reconnect.cb && reconnect)
uloop_timeout_set(&ctx->reconnect, 1);
}
ctx->socket_path = NULL;
__udebug_disconnect(ctx, false);
+ uloop_timeout_cancel(&ctx->reconnect);
while (!list_empty(&ctx->local_rings)) {
buf = list_first_entry(&ctx->local_rings, struct udebug_buf, list);