Retry if connection is reset by peer (fixes #57)