From cd3358c81477269da1ea05ff86a79f7ba014ea42 Mon Sep 17 00:00:00 2001 From: mscdex Date: Fri, 28 Jun 2013 13:38:43 -0400 Subject: [PATCH] readme: adjust examples --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 32a0bf6..5f6447c 100644 --- a/README.md +++ b/README.md @@ -70,10 +70,10 @@ imap.once('ready', function() { console.log(prefix + 'Finished'); }); }); - f.on('error', function(err) { + f.once('error', function(err) { console.log('Fetch error: ' + err); }); - f.on('end', function() { + f.once('end', function() { console.log('Done fetching all messages!'); imap.end(); }); @@ -126,10 +126,10 @@ openInbox(function(err, box) { console.log(prefix + 'Finished'); }); }); - f.on('error', function(err) { + f.once('error', function(err) { console.log('Fetch error: ' + err); }); - f.on('end', function() { + f.once('end', function() { console.log('Done fetching all messages!'); imap.end(); }); @@ -162,10 +162,10 @@ openInbox(function(err, box) { console.log(prefix + 'Finished'); }); }); - f.on('error', function(err) { + f.once('error', function(err) { console.log('Fetch error: ' + err); }); - f.on('end', function() { + f.once('end', function() { console.log('Done fetching all messages!'); imap.end(); });