grpc / grpc/grpc-node

grpc-js: hang when no server available on Windows

Open
#1,228 1 comment 5 reactions 0 assignees View on GitHub
package: @grpc/grpc-js
Dominant language
TypeScript
Stars
4.8k
Forks
716
Avg merge
2d 3h
Merged PRs (30d)
10

Description

### Problem description
Attempting to connect to an unavailable server on Windows the grpc-js library will hang forever instead of returning `UNAVAILABLE` as is done on other platforms (specifically tested with OSX).

I have modified the node example from the grpc repo to use `@gprc/grpc-js` and output errors to the console to minimally show this happening.

### Reproduction steps
1. Clone https://github.com/mpminardi/grpc/tree/windows-hang-example
2. `cd` into `examples/node` and run `npm install`
3. Run `node ./static_codegen/greeter_client.js` from within that directory
4. Observe that the process does not exit on Windows (similar to below output)

#### Windows output
![image](https://user-images.githubusercontent.com/8587567/71736963-a4a6bf80-2e0f-11ea-8d04-1048de05a083.png)

#### Mac Output
![image](https://user-images.githubusercontent.com/8587567/71736996-b5efcc00-2e0f-11ea-98ad-aed02e12625d.png)

### Environment
- OS: Windows 10 Version 1809 (OS Build 17763.914)
- Node version: 12.4
- Package name and version: grpc-js 0.6.15

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.