Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const timer = setTimeout(() => {
this._deliveryDispositionMap.delete(delivery.id);
log.receiver(
"[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
"Hence rejecting the promise with timeout error",
this._context.namespace.connectionId,
delivery.id,
messageDispositionTimeout
);
const e: AmqpError = {
condition: ErrorNameConditionMapper.ServiceUnavailableError,
description:
"Operation to settle the message has timed out. The disposition of the " +
"message may or may not be successful"
};
return reject(translate(e));
}, messageDispositionTimeout);
this._deliveryDispositionMap.set(delivery.id, {const timer = setTimeout(() => {
this._deliveryDispositionMap.delete(delivery.id);
log.receiver(
"[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
"Hence rejecting the promise with timeout error",
this._context.namespace.connectionId,
delivery.id,
Constants.defaultOperationTimeoutInSeconds * 1000
);
const e: AmqpError = {
condition: ErrorNameConditionMapper.ServiceUnavailableError,
description:
"Operation to settle the message has timed out. The disposition of the " +
"message may or may not be successful"
};
return reject(translate(e));
}, Constants.defaultOperationTimeoutInSeconds * 1000);
this._deliveryDispositionMap.set(delivery.id, {const actionAfterTimeout = () => {
removeListeners();
const desc: string =
`[${this._context.namespace.connectionId}] Sender "${this.name}" ` +
`with address "${this.address}", was not able to send the message right now, due ` +
`to operation timeout.`;
log.error(desc);
const e: AmqpError = {
condition: ErrorNameConditionMapper.ServiceUnavailableError,
description: desc
};
return reject(translate(e));
};const timer = setTimeout(() => {
this._deliveryDispositionMap.delete(delivery.id);
log.receiver(
"[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
"Hence rejecting the promise with timeout error.",
this._context.namespace.connectionId,
delivery.id,
Constants.defaultOperationTimeoutInSeconds * 1000
);
const e: AmqpError = {
condition: ErrorNameConditionMapper.ServiceUnavailableError,
description:
"Operation to settle the message has timed out. The disposition of the " +
"message may or may not be successful"
};
return reject(translate(e));
}, Constants.defaultOperationTimeoutInSeconds * 1000);
this._deliveryDispositionMap.set(delivery.id, {const timer = setTimeout(() => {
this._deliveryDispositionMap.delete(delivery.id);
log.receiver(
"[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
"Hence rejecting the promise with timeout error.",
this._context.namespace.connectionId,
delivery.id,
messageDispositionTimeout
);
const e: AmqpError = {
condition: ErrorNameConditionMapper.ServiceUnavailableError,
description:
"Operation to settle the message has timed out. The disposition of the " +
"message may or may not be successful"
};
return reject(translate(e));
}, messageDispositionTimeout);
this._deliveryDispositionMap.set(delivery.id, {const actionAfterTimeout = () => {
removeListeners();
const desc: string =
`[${this._context.namespace.connectionId}] Sender "${this.name}" ` +
`with address "${this.address}", was not able to send the message right now, due ` +
`to operation timeout.`;
log.error(desc);
const e: AmqpError = {
condition: ErrorNameConditionMapper.ServiceUnavailableError,
description: desc
};
return reject(translate(e));
};