Closed gkyildirim closed 1 year ago
Hi,
normally yep, unsubscribing should lead to a request cancellation.
Could you check in your browser's "Network" devtools section whether request is cancelled?
If not, this could be issue of the library.
If yes then the source of the issue could be either in a proxy: "standard" from envoy or one from improbable (even if you embed improbable proxy as a lib directly into your golang application).
It's also important what transport you use. If you use websocket transport from improbable, it could be a problem of the transport itself (at least I faced some issues with websocket transport).
So, as you might see, there are really many places where it could go wrong.
Thanks for your through answer. And sorry for the long delay. I was away for some time.
I see no request cancellation either in chrome's network tool nor in golang net/http request logs.
I embed improbable proxy as a lib and I do not use websocket.
It seems that I was wrong. Cancellation is send but it was not easy to detect for me. I even tried with Fiddler but could not figure out. There was a more than one obstacles for me. First I use angular proxy for my backend access and stream cancellation is not send with it. I tried to figure out if there is a working config but I could not. Second was the net/http. This is not certainly my area of expertise and I just switch to h2c handler and cancellation happened (even saw it in the http log which I could not before). At short stream cancellation works but I have not enought time to figure out the exact cause to write down here but some clues. @smnbbrv sorry for the noise and thanks for this great project.
No problem, I'm glad you solved the issue :)
I apologize if this is off the topic. If it is please feel free to close/ignore it.
As I understand I can close a server stream from client side by just unsubscribing like this.
My server is written in golang. And server sends stream even if unsubscription succesfully happened in angular.
May I ask if it should not be or do I have to figure out a way to handle connection close in the golang side?
Thanks in advance.