You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been playing with a stream client powered by monix, I noticed a weird behavior that's present on HttpClientMonixBackend and FetchMonixBackend, there is a chance this could be present in other backends but I haven't tried others.
In short, I'm using monix to expose server-sent events as an observable, still, when the server is stopped, the observable stays active without streaming events anymore (even if the backend starts again).
Steps to reproduce (code at the bottom):
Run sample server: scala-cli sse-server.scala
Verify backend is streaming events with curl localhost:8080/seconds -N
Run sample client: scala-cli sse-client.sc (it will start printing values).
I'd expect a way to detect the connection problem to retry or raise an error, which happens when invoking asStreamUnsafe instead of asStream (see sse-client-unsafe.sc).
I'll take the opportunity to ask about the difference between asStream and asStreamAlways.
I have been playing with a stream client powered by monix, I noticed a weird behavior that's present on
HttpClientMonixBackend
andFetchMonixBackend
, there is a chance this could be present in other backends but I haven't tried others.In short, I'm using monix to expose server-sent events as an observable, still, when the server is stopped, the observable stays active without streaming events anymore (even if the backend starts again).
Steps to reproduce (code at the bottom):
scala-cli sse-server.scala
curl localhost:8080/seconds -N
scala-cli sse-client.sc
(it will start printing values).I'd expect a way to detect the connection problem to retry or raise an error, which happens when invoking
asStreamUnsafe
instead ofasStream
(seesse-client-unsafe.sc)
.I'll take the opportunity to ask about the difference between
asStream
andasStreamAlways
.Code
sse-server.scala
sse-client.sc
sse-client-unsafe.sc
The text was updated successfully, but these errors were encountered: