mirror of https://github.com/grpc/grpc-node.git
grpc-js: Fix server trace function inconsistency
This commit is contained in:
parent
8aec160413
commit
16303d9f0b
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue