service: Take last error into acount when retrying to connect