Skip to content

Conversation

murgatroid99
Copy link
Member

The first fix, in client.ts is to null the callerStackError variable before the onReceiveStatus callback returns. The Error object retains information about the stack trace where it was created, including context objects. In the specific case where a new request is initiated while handling the result of a previous request, the new request's callerStackError would retain a stack context that includes the previous callerStackError. If done in a ping-pong type loop, this retention could be recursive.

The second fix is to ensure that non-OK statuses caused by picker errors (especially if the channel is not connected) are emitted asynchronously. If emitted synchronously, if calls are retried unconditionally and synchronously, the process could make no progress towards reconnecting, resulting in an infinite loop.

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

Successfully merging this pull request may close these issues.

2 participants