From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> Set att->fd to -1 when considered disconnected. --- v3: Pass btd_device instead of bt_att since the later may have been disconnected already. src/shared/att.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/att.c b/src/shared/att.c index 8bf3f4611..04577eddd 100644 --- a/src/shared/att.c +++ b/src/shared/att.c @@ -570,6 +570,7 @@ static bool disconnect_cb(struct io *io, void *user_data) io_destroy(att->io); att->io = NULL; + att->fd = -1; /* Notify request callbacks */ queue_remove_all(att->req_queue, NULL, NULL, disc_att_send_op); -- 2.17.1