Change the resend/retry mechanism so that the reties are performed by the user thread. I currently blocks the io threads.