mirror of https://github.com/grpc/grpc-node.git
Revert "Add specific call error for TCP disconnection"
This commit is contained in:
parent
f1f3cd32eb
commit
9e2aea0399
|
|
@ -342,18 +342,6 @@ export class Http2CallStream extends Duplex implements Call {
|
|||
* from bubbling up. However, errors here should all correspond to
|
||||
* "close" events, where we will handle the error more granularly */
|
||||
});
|
||||
/* If the underlying TLS or TCP connection closes, we want to end the
|
||||
* call with an UNAVAILABLE status to match the behavior of the other
|
||||
* library. In this handler we don't wait for trailers before ending the
|
||||
* call. This should ensure that this endCall happens sooner than the one
|
||||
* in the stream.on('close', ...) handler. */
|
||||
stream.session.socket.on('close', () => {
|
||||
this.endCall({
|
||||
code: Status.UNAVAILABLE,
|
||||
details: 'Connection dropped',
|
||||
metadata: new Metadata(),
|
||||
});
|
||||
});
|
||||
if (!this.pendingRead) {
|
||||
stream.pause();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue