Implement resending request immediately after connection failure (#87)

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>