Method: Client#shutdown

Defined in:
lib/client.rb

#shutdown(imap) ⇒ Object

If the gem is being used for local-lockbox mode, after fetching all emails, the process will go idle mode. If user send the interrupt command, it will call shutdown to disconnect the connection with imap server



226
227
228
229
230
231
232
233
# File 'lib/client.rb', line 226

def shutdown(imap)
  imap.idle_done
  imap.logout unless imap.disconnected?
  imap.disconnect

  @logger.info "#{$0} has ended (crowd applauds)"
  exit 0
end