         async.eachSeries accounts, (account, cb) ->
             log.debug "refreshing account #{account.label}"
             return cb null if account.isTest()
+            return cb null if account.isRefreshing()
             account.imap_fetchMails limit, onlyFavorites, cb
         , callback
 

                box.destroyAndRemoveAllMessages cb

            , (err) ->
                reporter.onDone()
                callback null




Account::doASAP = (operation, callback) ->
    ImapPool.get(@id).doASAP operation, callback

Account::isTest = ->
    @accountType is 'TEST'

Account::isRefreshing = ->
    ImapPool.get(@id).isRefreshing

Account::setRefreshing = (value) ->
    ImapPool.get(@id).isRefreshing = value

# Public: refresh all accounts
#
