Revision 8e62af8d
Added by Marc Dequènes almost 11 years ago
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
[fix] wakeup when received mail in idle mode