Closed kehiy closed 2 months ago
I don't think we need this. What does this solve? If the relay fails to close the subscription, it will keep sending events, or waste resources on its side. Neither of these really affect the client's ability to stop listening to the request.
@staab in most of protocols (state-full) you can see we need to acknowledge about changing the state that nodes have about each other.
That's not really an argument. Is there a use case this supports, or is it just busy work?
This just adds unnecessary bloat.
how a client can find out if the closing process was successful? relay changes an state related to client which affects their communication, but client can be aware of that how was it? successful or failed?
how a client can find out if the closing process was successful?
Why would a client care?
@staab to make sure a relay won't misbehave, otherwise close the connection with them in the WebSocket layer.
I agree with @staab. I thought some relays send ["CLOSED", "sub1"]
, but it was just my imagination.
@kehiy doing so would break all current implementations. Also, CLOSED is no guarantee that the relay isn't still misbehaving. If clients want to do that they have to analyze the behavior of the relay, not just blindly trust what it says.
@staab @AsaiToshiya ok, makes sense.
we have to clarify how a relay can acknowledge a close request from a client. here is a draft pr on immortal which implements that. more implementation may do that which im not aware of.