Comparing version 1.0.8 to 1.0.9
@@ -85,13 +85,18 @@ var util = require('util') | ||
var self = this; | ||
if (err || !data) { | ||
if (err) { | ||
console.error('Channel_handleNext', self.name, err); | ||
self._close(); | ||
self.emit('error', err ? err : new Error('no data')); | ||
self.emit('close', { reason: "error" }); | ||
} else if (!data) { | ||
console.warn('Channel_handleNext', self.name, "no data"); | ||
self._close(); | ||
self.emit('close', { reason: "no_data" }); | ||
} else { | ||
if (data.type) self.emit(data.type, data); | ||
self.emit('data', data); | ||
self.cursor.nextObject(function(err, data) { | ||
self._handleNext(err, data); | ||
}); | ||
if (self.cursor) { | ||
self.cursor.nextObject(function(err, data) { | ||
self._handleNext(err, data); | ||
}); | ||
} | ||
} | ||
@@ -98,0 +103,0 @@ } |
{ | ||
"name": "vubsub", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Pub/Sub for Node.js and MongoDB", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/vivocha/vubsub", |
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
10365
200