rhea-promise
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -0,1 +1,4 @@ | ||
### 0.1.12 - 2018-11-16 | ||
- Fix a minor bug in receiver creation. | ||
### 0.1.11 - 2018-11-15 | ||
@@ -2,0 +5,0 @@ - Added checks for some event handler methods to exist before logging information that uses node's |
@@ -155,3 +155,2 @@ "use strict"; | ||
} | ||
const handlersProvided = options && options.onMessage ? true : false; | ||
// Register session handlers for session_error and session_close if provided. | ||
@@ -176,6 +175,9 @@ // listeners provided by the user in the options object should be added | ||
let waitTimer; | ||
if (handlersProvided) { | ||
if (options && options.onMessage) { | ||
receiver.on(rhea_1.ReceiverEvents.message, options.onMessage); | ||
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.message); | ||
} | ||
if (options && options.onError) { | ||
receiver.on(rhea_1.ReceiverEvents.receiverError, options.onError); | ||
log.receiver("[%s] Added event handler for events: '%s', '%s', on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.message, rhea_1.ReceiverEvents.receiverError); | ||
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", this.connection.id, rhea_1.ReceiverEvents.receiverError); | ||
} | ||
@@ -182,0 +184,0 @@ if (options && options.onClose) { |
@@ -187,3 +187,2 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
const handlersProvided = options && options.onMessage ? true : false; | ||
// Register session handlers for session_error and session_close if provided. | ||
@@ -210,8 +209,12 @@ // listeners provided by the user in the options object should be added | ||
if (handlersProvided) { | ||
receiver.on(ReceiverEvents.message, options!.onMessage!); | ||
receiver.on(ReceiverEvents.receiverError, options!.onError!); | ||
log.receiver("[%s] Added event handler for events: '%s', '%s', on rhea-promise 'receiver'.", | ||
this.connection.id, ReceiverEvents.message, ReceiverEvents.receiverError); | ||
if (options && options.onMessage) { | ||
receiver.on(ReceiverEvents.message, options.onMessage); | ||
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", | ||
this.connection.id, ReceiverEvents.message); | ||
} | ||
if (options && options.onError) { | ||
receiver.on(ReceiverEvents.receiverError, options.onError); | ||
log.receiver("[%s] Added event handler for event '%s' on rhea-promise 'receiver'.", | ||
this.connection.id, ReceiverEvents.receiverError); | ||
} | ||
@@ -218,0 +221,0 @@ if (options && options.onClose) { |
{ | ||
"name": "rhea-promise", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"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
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
239811
4371