Closed
Description
Problem description
Attempting to close the client's connections to a server after making a single unary call triggers a panic in Node (this may actually be a bug in Node, it's not clear to me).
Reproduction steps
I have a client class that manages a couple gRPC streams (_events
and _tunnelStream
) that are open for the lifetime of the client class. The client also makes unary calls. After making any number of unary calls (1 or more), and attempting to disconnect with the function below triggers a double free what appears to be the NodeJS HTTP/2 library:
async disconnect(): Promise<void> {
if (this._events !== null) {
this._events.on('error', () => {})
this._events.cancel()
}
if (this._tunnelStream !== null) {
this._tunnelStream.on('error', () => {})
this._tunnelStream.cancel()
}
this.rpc.close()
}
Environment
- MacOS / Ubuntu 20.04
- Node version 14
- Package name and version
@grpc/grpc-js ^1.0.3
Activity