Closed FLamparski closed 10 years ago
Not tested, but when the fetch fails with a "Nothing to fetch" message, returns an empty array. We'll see how that goes.
Callbacks, anyone? The function that calls the callback needs to return after calling it. Because WTF. Otherwise, this happens:
app/server/checkmail.js:33
f.on('message', function(message, seqno){
^
TypeError: Cannot call method 'on' of undefined
Also, something bad happened here. Looks like the callback is not passed in or captured properly -- I probably should pass it in explicitly.
app/server/checkmail.js:73
if (err) callback(err, null);
^
TypeError: undefined is not a function
Fixed in b098038e.
An offshoot of #2, however it's an important case to handle. Count the messages before doing a fetch request!