Skip to content

Commit

Permalink
grpc-js: Fix server trace function inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Oct 6, 2021
1 parent 8aec160 commit 16303d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/grpc-js/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ export class Server {

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

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

Expand Down

0 comments on commit 16303d9

Please sign in to comment.