forked from coolaj86/goldilocks.js
changed errors a bit more.
This commit is contained in:
parent
9eb96be46c
commit
4b9db320c0
|
@ -160,7 +160,9 @@ module.exports.create = function (deps, config) {
|
|||
"Number of errorListeners:", conn.listenerCount("error"),
|
||||
"Error: ", err
|
||||
);
|
||||
if(!conn.listenerCount("error")) conn.emit("error", err);
|
||||
if(conn.listenerCount("error") <= 1) {
|
||||
process.nextTick(function() {conn.emit("error", err);});
|
||||
}
|
||||
});
|
||||
conn.removeListener('error', onError);
|
||||
peek(conn, chunk, opts);
|
||||
|
|
Loading…
Reference in New Issue