Implement resending request immediately after connection failure (#87)

This implements feature request in #87

The patch is submitted under MIT License