diff --git a/src/shared/att.c b/src/shared/att.c
index 85feead..62c884b 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
uint8_t opcode;
void *pdu;
uint16_t len;
+ bool retry;
bt_att_response_func_t callback;
bt_att_destroy_func_t destroy;
void *user_data;
*opcode = rsp->opcode;
+ /* If operation has already been marked as retry don't attempt to change
+ * the security again.
+ */
+ if (op->retry)
+ return false;
+
/* Attempt to change security */
if (!change_security(chan, rsp->ecode))
return false;
DBG(att, "(chan %p) Retrying operation %p", chan, op);
chan->pending_req = NULL;
+ op->retry = true;
/* Push operation back to channel queue */
return queue_push_head(chan->queue, op);