Reputation: 406
I'm writing a client for an SSE stream. I've searched the docs but can't find the answer. I use the following process:
If my client for a longer period cannot connect to the stream, at some point the Last-Event-Id
that my client is passing to the server in the reconnect attempts will be too old. The server will have dropped it from its cache. So when it reconnects, it will have missed a number of events.
With SSE in general, how can the client tell its last ID is outdated and restoring the connection won't work. In my case I have to go back to step 2, refetching the entire state again.
Or the other way around: how should a server deal with an unknown Event-Id passed in by the client?
Any help is greatly appreciated.
Upvotes: 0
Views: 1073
Reputation: 406
Apparently there is no answer to this question, since it hasn't been specified in the spec (yet).
See comments here and issue filed here.
Upvotes: 1