denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.07k stars 5.4k forks source link

@grpc/grpc-js cannot reconnect after server restart #26907

Open rnza0u opened 1 week ago

rnza0u commented 1 week ago

Hello,

I am using @grpc/grpc-js in version 1.12.2.

I am reporting a bug related to this issue on the owner's repo: https://github.com/grpc/grpc-node/issues/2853

Bug does not occur when using Node, only with Deno.

The steps to reproduce would be to make one successful RPC call, then restart the server and try to make another call.

Any idea why this is happening ?

Thanks...

Version: Deno 2.0.6

murgatroid99 commented 6 days ago

gRPC maintainer here. Based on the logs provided in the linked grpc-node issue, the problem is that Deno's Http2Session implementation does not emit a close or goaway event when the connection closes or when it receives a GOAWAY, and it does not throw an error when session.request is called after a GOAWAY is received. As a result, gRPC never detects that the session is closed.