Skip to content

How to cancel/terminate a RpcOutputStream from the client side? #179

Answered by caesuric
swwilson-bsi asked this question in Q&A
Discussion options

You must be logged in to vote

With the caveat that I haven't tested it yet since it's a work in progress, according to the manual, it appears that this is the correct way:

const aborter = new AbortController();
const stream = this.client.streamingCall(message, {
    abort: aborter.signal
});

// cancel later
aborter.abort();

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@swwilson-bsi
Comment options

@timostamm
Comment options

@caesuric
Comment options

Answer selected by swwilson-bsi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants