Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calls to stream methods removeListener and cancel being ignored #6

Open
friedemannf opened this issue Apr 11, 2022 · 5 comments · May be fixed by #7
Open

Calls to stream methods removeListener and cancel being ignored #6

friedemannf opened this issue Apr 11, 2022 · 5 comments · May be fixed by #7

Comments

@friedemannf
Copy link

The current DevToolsStreamInterceptor implementation doesn't support calls to the stream's methods removeListener and cancel as calling these methods on the interceptor just does nothing. This leads to streams not being cancelled while the devtools are open.

@jrapoport
Copy link
Owner

It looks like I stubbed these out deliberately, but can't recall why. -1 to myself for not leaving a comment.

@jrapoport
Copy link
Owner

I do recall at the time the implementation for streaming wasn't fully baked. It's possible those calls caused problems back then that have since been resolved. I'd like to have a peek at the grpc library to see what's changed and if there are any obvious gotchas. Have you tested it out? Thanks!

@friedemannf
Copy link
Author

Thanks for your reply! Yes, we have a version of the devtools with this fix running in our team and it has fixed our imminent issue of cancel calls not going through. I'm not sure about removeListener though. If I should have a look at that or test anything else, let me know!

@jrapoport
Copy link
Owner

Was the issue that if the cancel call does not propagate the stream won't cancel properly? Mainly I just want to look through the implementation of grpc to see if there's an obvious reason I omitted those calls. It's possible I just missed it.

@friedemannf
Copy link
Author

Yes exactly, we register a callback using stream.on('data', response => {...}) and after eventually calling stream.cancel() are continuing to receive calls to that callback as the stream isn't cancelled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants