@grpc/grpc-js
Advanced tools
Comparing version 1.8.14 to 1.8.15
@@ -160,3 +160,3 @@ "use strict"; | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -185,3 +185,3 @@ onReceiveMetadata: (metadata) => { | ||
metadata: status.metadata | ||
}, callerStack)); | ||
}, /*callerStack*/ '')); | ||
} | ||
@@ -194,4 +194,7 @@ else { | ||
const callerStack = getErrorStackString(callerStackError); | ||
callProperties.callback((0, call_1.callErrorFromStatus)(status, callerStack)); | ||
callProperties.callback((0, call_1.callErrorFromStatus)(status, /*callerStack*/ '')); | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
emitter.emit('status', status); | ||
@@ -240,3 +243,3 @@ }, | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -275,2 +278,5 @@ onReceiveMetadata: (metadata) => { | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
emitter.emit('status', status); | ||
@@ -339,3 +345,3 @@ }, | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -359,2 +365,5 @@ onReceiveMetadata(metadata) { | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
stream.emit('status', status); | ||
@@ -401,3 +410,3 @@ }, | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -420,2 +429,5 @@ onReceiveMetadata(metadata) { | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
stream.emit('status', status); | ||
@@ -422,0 +434,0 @@ }, |
@@ -179,3 +179,5 @@ "use strict"; | ||
const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(pickResult.status.code, pickResult.status.details); | ||
this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'DROP'); | ||
setImmediate(() => { | ||
this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'DROP'); | ||
}); | ||
break; | ||
@@ -188,3 +190,5 @@ case picker_1.PickResultType.TRANSIENT_FAILURE: | ||
const { code, details } = (0, control_plane_status_1.restrictControlPlaneStatusCode)(pickResult.status.code, pickResult.status.details); | ||
this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'PROCESSED'); | ||
setImmediate(() => { | ||
this.outputStatus({ code, details, metadata: pickResult.status.metadata }, 'PROCESSED'); | ||
}); | ||
} | ||
@@ -191,0 +195,0 @@ break; |
@@ -176,4 +176,2 @@ "use strict"; | ||
this.connectivityState = newState; | ||
process.nextTick(() => { | ||
}); | ||
switch (newState) { | ||
@@ -180,0 +178,0 @@ case connectivity_state_1.ConnectivityState.READY: |
{ | ||
"name": "@grpc/grpc-js", | ||
"version": "1.8.14", | ||
"version": "1.8.15", | ||
"description": "gRPC Library for Node - pure JS implementation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://grpc.io/", |
@@ -326,3 +326,3 @@ /* | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError: Error | null = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -346,3 +346,3 @@ onReceiveMetadata: (metadata) => { | ||
if (responseMessage === null) { | ||
const callerStack = getErrorStackString(callerStackError); | ||
const callerStack = getErrorStackString(callerStackError!); | ||
callProperties.callback!(callErrorFromStatus({ | ||
@@ -352,3 +352,3 @@ code: Status.INTERNAL, | ||
metadata: status.metadata | ||
}, callerStack)); | ||
}, /*callerStack*/'')); | ||
} else { | ||
@@ -358,5 +358,8 @@ callProperties.callback!(null, responseMessage); | ||
} else { | ||
const callerStack = getErrorStackString(callerStackError); | ||
callProperties.callback!(callErrorFromStatus(status, callerStack)); | ||
const callerStack = getErrorStackString(callerStackError!); | ||
callProperties.callback!(callErrorFromStatus(status, /*callerStack*/'')); | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
emitter.emit('status', status); | ||
@@ -455,3 +458,3 @@ }, | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError: Error | null = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -475,3 +478,3 @@ onReceiveMetadata: (metadata) => { | ||
if (responseMessage === null) { | ||
const callerStack = getErrorStackString(callerStackError); | ||
const callerStack = getErrorStackString(callerStackError!); | ||
callProperties.callback!(callErrorFromStatus({ | ||
@@ -486,5 +489,8 @@ code: Status.INTERNAL, | ||
} else { | ||
const callerStack = getErrorStackString(callerStackError); | ||
const callerStack = getErrorStackString(callerStackError!); | ||
callProperties.callback!(callErrorFromStatus(status, callerStack)); | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
emitter.emit('status', status); | ||
@@ -587,3 +593,3 @@ }, | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError: Error | null = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -604,5 +610,8 @@ onReceiveMetadata(metadata: Metadata) { | ||
if (status.code !== Status.OK) { | ||
const callerStack = getErrorStackString(callerStackError); | ||
const callerStack = getErrorStackString(callerStackError!); | ||
stream.emit('error', callErrorFromStatus(status, callerStack)); | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
stream.emit('status', status); | ||
@@ -685,3 +694,3 @@ }, | ||
let receivedStatus = false; | ||
const callerStackError = new Error(); | ||
let callerStackError: Error | null = new Error(); | ||
call.start(callProperties.metadata, { | ||
@@ -701,5 +710,8 @@ onReceiveMetadata(metadata: Metadata) { | ||
if (status.code !== Status.OK) { | ||
const callerStack = getErrorStackString(callerStackError); | ||
const callerStack = getErrorStackString(callerStackError!); | ||
stream.emit('error', callErrorFromStatus(status, callerStack)); | ||
} | ||
/* Avoid retaining the callerStackError object in the call context of | ||
* the status event handler. */ | ||
callerStackError = null; | ||
stream.emit('status', status); | ||
@@ -706,0 +718,0 @@ }, |
@@ -219,3 +219,5 @@ /* | ||
const {code, details} = restrictControlPlaneStatusCode(pickResult.status!.code, pickResult.status!.details); | ||
this.outputStatus({code, details, metadata: pickResult.status!.metadata}, 'DROP'); | ||
setImmediate(() => { | ||
this.outputStatus({code, details, metadata: pickResult.status!.metadata}, 'DROP'); | ||
}); | ||
break; | ||
@@ -227,3 +229,5 @@ case PickResultType.TRANSIENT_FAILURE: | ||
const {code, details} = restrictControlPlaneStatusCode(pickResult.status!.code, pickResult.status!.details); | ||
this.outputStatus({code, details, metadata: pickResult.status!.metadata}, 'PROCESSED'); | ||
setImmediate(() => { | ||
this.outputStatus({code, details, metadata: pickResult.status!.metadata}, 'PROCESSED'); | ||
}); | ||
} | ||
@@ -230,0 +234,0 @@ break; |
@@ -230,4 +230,2 @@ /* | ||
this.connectivityState = newState; | ||
process.nextTick(() => { | ||
}); | ||
switch (newState) { | ||
@@ -234,0 +232,0 @@ case ConnectivityState.READY: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1699711
33659