tried to remove race condition where sender thread is waiting with
increasing the sequence number and the receiver sends an ack with the
old sequence number