rhea-promise
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -334,2 +334,3 @@ "use strict"; | ||
const actionAfterTimeout = () => { | ||
var _a; | ||
removeListeners(); | ||
@@ -339,2 +340,10 @@ const msg = `Unable to create the amqp receiver '${receiver.name}' on amqp ` + | ||
log.error("[%s] %s", this.connection.id, msg); | ||
const createReceiverOptions = options; | ||
if ((_a = createReceiverOptions === null || createReceiverOptions === void 0 ? void 0 : createReceiverOptions.session) === null || _a === void 0 ? void 0 : _a.createReceiver) { | ||
// being called on a session passed via the options so don't close the session | ||
receiver.close({ closeSession: false }).then(() => { receiver.remove(); }); | ||
} | ||
else { | ||
receiver.close({ closeSession: true }).then(() => { receiver.remove(); }); | ||
} | ||
return reject(new errorDefinitions_1.OperationTimeoutError(msg)); | ||
@@ -341,0 +350,0 @@ }; |
@@ -5,3 +5,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
import * as log from "./log"; | ||
import { Connection } from "./connection"; | ||
import { Connection, CreateReceiverOptions } from "./connection"; | ||
import { Receiver, ReceiverOptions } from "./receiver"; | ||
@@ -400,2 +400,11 @@ import { Sender, SenderOptions } from "./sender"; | ||
log.error("[%s] %s", this.connection.id, msg); | ||
const createReceiverOptions = options as CreateReceiverOptions; | ||
if (createReceiverOptions?.session?.createReceiver) { | ||
// being called on a session passed via the options so don't close the session | ||
receiver.close({ closeSession: false }).then(() => { receiver.remove(); }) | ||
} else { | ||
receiver.close({ closeSession: true }).then(() => { receiver.remove(); }) | ||
} | ||
return reject(new OperationTimeoutError(msg)); | ||
@@ -402,0 +411,0 @@ }; |
{ | ||
"name": "rhea-promise", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "A Promisified layer over rhea AMQP client", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
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
371087
6196