Skip to content

Commit

Permalink
Comments (DH-18086-2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Jan 14, 2025
1 parent 74d9057 commit 7c0ad0d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/jsapi-nodejs/src/NodeHttp2gRPCTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ export class NodeHttp2gRPCTransport implements GrpcTransport {

private request: http2.ClientHttp2Stream | null = null;

/**
* Create an http2 client stream that can send requests to the server and pass
* responses to callbacks defined on the transport options.
* @param headers Request headers
* @returns The created http2 client stream
*/
createRequest = (
headers: Record<string, string> | null
): http2.ClientHttp2Stream => {
Expand Down Expand Up @@ -159,7 +165,7 @@ export class NodeHttp2gRPCTransport implements GrpcTransport {
*/
finishSend(): void {
logger.debug('finishSend');
assertNotNull(this.request, '_request');
assertNotNull(this.request, 'request is required');
this.request.end();
}

Expand All @@ -169,7 +175,7 @@ export class NodeHttp2gRPCTransport implements GrpcTransport {
*/
cancel(): void {
logger.debug('cancel');
assertNotNull(this.request, '_request');
assertNotNull(this.request, 'request is required');
this.request.close();
}

Expand Down

0 comments on commit 7c0ad0d

Please sign in to comment.