Prioritize reconnect after connection loss in GrpcClient
dpasek-senacor opened this issue · 0 comments
dpasek-senacor commented
Currently the GrpcClient implementation triggers an automatic reconnect if an operation fails due to connection loss. This reconnect is queue inside the GrpcClient after all other open work items to be executed.
This means, that already queued work items will most probably fail as the reconnect is not performed until all these work items have been executed against the lost server connection.
A simple solution to this problem would be to prioritize the work item for connecting to the server (CreateChannel) over other work items, i.e. always adding it at the beginning of the work item queue instead of the end.
I will provide a PR for this.