MailHandler: exit with 75 when a SystemCallError is raised (#12528).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10954 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cf69c2da21
commit
00d16d07de
|
@ -99,7 +99,12 @@ class RedmineMailHandler
|
||||||
issue_attributes.each { |attr, value| data["issue[#{attr}]"] = value }
|
issue_attributes.each { |attr, value| data["issue[#{attr}]"] = value }
|
||||||
|
|
||||||
debug "Posting to #{uri}..."
|
debug "Posting to #{uri}..."
|
||||||
|
begin
|
||||||
response = Net::HTTPS.post_form(URI.parse(uri), data, headers, :no_check_certificate => no_check_certificate)
|
response = Net::HTTPS.post_form(URI.parse(uri), data, headers, :no_check_certificate => no_check_certificate)
|
||||||
|
rescue SystemCallError => e # connection refused, etc.
|
||||||
|
warn "An error occured while contacting your Redmine server: #{e.message}"
|
||||||
|
return 75 # temporary failure
|
||||||
|
end
|
||||||
debug "Response received: #{response.code}"
|
debug "Response received: #{response.code}"
|
||||||
|
|
||||||
case response.code.to_i
|
case response.code.to_i
|
||||||
|
|
Loading…
Reference in New Issue