Skip to content

Commit

Permalink
Merge pull request #1036 from murgatroid99/grpc-js_revert_tcp_close_l…
Browse files Browse the repository at this point in the history
…istener

Revert "Add specific call error for TCP disconnection"
  • Loading branch information
murgatroid99 authored Sep 20, 2019
2 parents f1f3cd3 + 9e2aea0 commit 913ae80
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/grpc-js/src/call-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 913ae80

Please sign in to comment.