Skip to content

Commit 16303d9

Browse files
committed
grpc-js: Fix server trace function inconsistency
1 parent 8aec160 commit 16303d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/grpc-js/src/server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ export class Server {
391391

392392
const http2Server = setupServer();
393393
return new Promise<number | Error>((resolve, reject) => {
394-
function onError(err: Error): void {
395-
trace('Failed to bind ' + subchannelAddressToString(address) + ' with error ' + err.message);
394+
const onError = (err: Error) => {
395+
this.trace('Failed to bind ' + subchannelAddressToString(address) + ' with error ' + err.message);
396396
resolve(err);
397397
}
398398

@@ -467,8 +467,8 @@ export class Server {
467467
const address = addressList[0];
468468
const http2Server = setupServer();
469469
return new Promise<BindResult>((resolve, reject) => {
470-
function onError(err: Error): void {
471-
trace('Failed to bind ' + subchannelAddressToString(address) + ' with error ' + err.message);
470+
const onError = (err: Error) => {
471+
this.trace('Failed to bind ' + subchannelAddressToString(address) + ' with error ' + err.message);
472472
resolve(bindWildcardPort(addressList.slice(1)));
473473
}
474474

0 commit comments

Comments
 (0)