floca-amqp-client
Advanced tools
Comparing version 0.6.7 to 0.7.0
@@ -103,4 +103,5 @@ 'use strict' | ||
var reComm = Communication.importCommunication( comm.comm ) | ||
if ( !self.comms[ reComm.externalId ] ) return | ||
if ( !self.comms[ reComm.originalId ] ) return | ||
if ( self.expAck ) | ||
@@ -112,4 +113,4 @@ socket.ack() | ||
var response = self.conformResponse( comm.err ? new Error(comm.err) : null, responses ) | ||
self.comms[ reComm.externalId ]( response.err, response.res ) | ||
delete self.comms[ reComm.externalId ] | ||
self.comms[ reComm.originalId ]( response.err, response.res ) | ||
delete self.comms[ reComm.originalId ] | ||
} ) | ||
@@ -221,3 +222,3 @@ socket.connect( division, function ( ) { | ||
var packet = JSON.stringify( { id: comm.id, comm: comm, callback: !!comm.callback } ) | ||
self.comms[ comm.externalId ] = cb | ||
self.comms[ comm.id ] = cb | ||
@@ -228,4 +229,4 @@ self.outs[ comm.division ].write(packet, 'utf8') | ||
setTimeout( function () { | ||
if ( self.comms[ comm.externalId ] ) | ||
self.comms[ comm.externalId ]( new Error('Communication has not been received answer withing the given timeframe: ' + comm.event ) ) | ||
if ( self.comms[ comm.id ] ) | ||
self.comms[ comm.id ]( new Error('Communication has not been received answer withing the given timeframe: ' + comm.event ) ) | ||
}, self.options.timeout ) | ||
@@ -232,0 +233,0 @@ } ) |
{ | ||
"name": "floca-amqp-client", | ||
"version": "0.6.7", | ||
"version": "0.7.0", | ||
"description": "AMQP client for floca-based projects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
15624