-
Notifications
You must be signed in to change notification settings - Fork 5
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
[protocolv2] Ignore follow up messages to a stream after server aborts it #204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
add(item: string) { | ||
if (this.items.has(item)) { | ||
this.items.delete(item); | ||
} else if (this.items.size >= this.maxItems) { | ||
const first = this.items.values().next(); | ||
if (!first.done) { | ||
this.items.delete(first.value); | ||
} | ||
} | ||
this.items.add(item); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels elegant, nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty :)
6618a10
to
04eaac6
Compare
a232b6d
to
bad8e76
Compare
…s it (#204) ## Why When the server aborts a stream (due to invalid request or explicit abort) the client send more messages before it gets the abort. We should make sure this doesn't lead to errors and unnecessary follow up responses. ## What changed Keep an LRU of aborted streams, if a new message comes in for a stream in our set, we simply ignore the message.
…s it (#204) ## Why When the server aborts a stream (due to invalid request or explicit abort) the client send more messages before it gets the abort. We should make sure this doesn't lead to errors and unnecessary follow up responses. ## What changed Keep an LRU of aborted streams, if a new message comes in for a stream in our set, we simply ignore the message.
…s it (#204) ## Why When the server aborts a stream (due to invalid request or explicit abort) the client send more messages before it gets the abort. We should make sure this doesn't lead to errors and unnecessary follow up responses. ## What changed Keep an LRU of aborted streams, if a new message comes in for a stream in our set, we simply ignore the message.
Why
When the server aborts a stream (due to invalid request or explicit abort) the client send more messages before it gets the abort. We should make sure this doesn't lead to errors and unnecessary follow up responses.
What changed
Keep an LRU of aborted streams, if a new message comes in for a stream in our set, we simply ignore the message.