Seems that when encountering packet-loss NbTrans is adapted to either 1 or 3. Value 2 is used only as a step between 1 and 3.
In my test nbTrans is initially set to 1. In case of packet loss:
1/20 (5%) packets lost, NbTrans value stays at 1, no changes.
2/20 (10%) packets lost, NbTrans is changed from 1 to 2. Immediately after nbTrans value is changed from 2 to 3.
Shouldn´t the nbTrans adapt so that the value is first increased from 1 to 2 and then if more packets are lost nbTrans is increased from 2 to 3?