Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry request once on server disconnect #1369

Closed
wants to merge 1 commit into from

Conversation

bdraco
Copy link

@bdraco bdraco commented Mar 27, 2023

fixes home-assistant/core#90199

datatracker.ietf.org/doc/html/rfc2616#section-8.1.4

A client, server, or proxy MAY close the transport connection at any
time. For example, a client might have started to send a new request
at the same time that the server has decided to close the "idle"
connection. From the server's point of view, the connection is being
closed while it was idle, but from the client's point of view, a
request is in progress.

This means that clients, servers, and proxies MUST be able to recover
from asynchronous close events. Client software SHOULD reopen the
transport connection and retransmit the aborted sequence of requests
without user interaction so long as the request sequence is
idempotent (see section 9.1.2). Non-idempotent methods or sequences
MUST NOT be automatically retried, although user agents MAY offer a
human operator the choice of retrying the request(s). Confirmation by
user-agent software with semantic understanding of the application
MAY substitute for user confirmation. The automatic retry SHOULD NOT
be repeated if the second sequence of requests fails.

@bdraco bdraco force-pushed the retry_server_disconnect branch from da2457c to 7c7721c Compare March 27, 2023 21:16
@bdraco
Copy link
Author

bdraco commented May 15, 2023

I solved this with a decorator downstream

@bdraco bdraco closed this May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ONVIF Integration suddenly lost a number of entities.
1 participant