It has happened that no transaction for any of the sleeping devices was processed, because the transaction sleepyTransaction counter was no longer decrements.
After investigation, I noticed that a transaction placed in a sleepy queue (in method sendNextTRansaction), once processed:
In the transactionComplete method, when the queue is retrieved using getTransactionQueue, it is no longer marked as sleepy because it becomes the default queue...?...
Therefore, the counter is not decremented.
Another comment, I was surprised to see that there was only a global counter for all sleeping devices, and not a per-device counter. Wouldn’t it be relevant to have a counter per queue?