Project

General

Profile

« Previous | Next » 

Revision 8e62af8d

Added by Marc Dequènes almost 11 years ago

[fix] wakeup when received mail in idle mode

View differences:

lib/cyborghood/imap.rb
@available_mails = resp.data.to_i
logger.debug "*** Received new mails (#{@available_mails})" if @available_mails > 0
end
wakeup
when "BYE"
@need_reconnect = true
logger.debug "IMAP reconnection needed"
......
true
end
def wakeup
return unless self.capabilities.include?("IDLE")
begin
@imap.idle_done
rescue
end
end
def check_mails_once(&message_handler)
connect &&
authenticate &&

Also available in: Unified diff