Introduced a custom send queue type that actually contains two queues, one for resends, one for regular lines. A flag indicates whether lines should be returned from both or only resends. That way we ensure that as soon as we have an active resend request we ignore what was already in the queue and only send the lines we need to resend. Also: PrependQueue => PrependableQueue