Revision 9f5adedd
Added by Marc Dequènes almost 11 years ago
lib/cyborghood/imap.rb | ||
---|---|---|
# -*- coding: utf-8 -*-
|
||
#--
|
||
# CyborgHood, a distributed system management software.
|
||
# Copyright (c) 2009-2010 Marc Dequènes (Duck) <Duck@DuckCorp.org>
|
||
... | ... | |
begin
|
||
@imap = Net::IMAP.new(@params.host, {:port => port, :ssl => ssl,
|
||
:options => {:ca_file => @params.ca_cert, :verify_mode => OpenSSL::SSL::VERIFY_PEER}})
|
||
rescue SocketError
|
||
rescue SocketError, Errno::ECONNRESET
|
||
logger.warn "Could not connect to the IMAP server"
|
||
return false
|
||
end
|
Also available in: Unified diff
[fix] also catch Errno::ECONNRESET when trying to connect to the IMAP server