Skip to content
Browse files

Call parse_raw_part directly to stop event interference

  • Loading branch information...
1 parent 6d7d02b commit aca55d8f908456f6dabc8c438f07e5263cab5428 @jrgns committed Sep 3, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 parser_email.js
View
5 parser_email.js
@@ -9,8 +9,6 @@ function ParserEmail(content) {
var parser = this;
parser.content = content;
-
- parser.on('raw_part', parser.parse_raw_part);
}
util.inherits(ParserEmail, events.EventEmitter);
@@ -122,8 +120,11 @@ ParserEmail.prototype.parse_part = function(content) {
} else {
content = '';
}
+
util.debug('Emitting raw part on ' + headers['content-type'].value);
parser.emit('raw_part', headers, content);
+
+ parser.parse_raw_part(headers, content);
}
ParserEmail.prototype.parse_raw_part = function(headers, content) {

0 comments on commit aca55d8

Please sign in to comment.
Something went wrong with that request. Please try again.