Open ShayOinif opened 2 weeks ago
Hi, thank you for the question! I'm not sure what do you want to do. If a client or a service disconnects, its corresponding CoroutineScope will cancel. If the there was an error with a flow request - it should throw. There is no retry mechanism right now, that is true
I simply expected if a service goes away, that the flow I am consuming will end no matter on what coroutine scope I collect it.
In a normal shutdown, krpc protocol sends an end message for all clients, but in a case of an unexpected crash, the coroutine scope of the backing - web socket with ktor krpc - ends but the corresponding client flow doesn't, unless collected on the client's coroutine scope.
Hello. I don't know if it is an issue or not, but I definitely find it weird. It seems like there is no way of telling when the client is disconnected like a status flow, or on disconnection lambda to register. Right now when I consume flow and server goes away, the flow is now completed. As a workaround I created my little helper flows (Also to maintain single client for my app), like so:
I wonder if it is the intended use or am I missing something or should the interface or behavior change? Thanks, Shay Oinif