Handle socket errors more gracefully
git-svn-id: file:///home/svn/framework3/trunk@5864 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
2d498ed3c5
commit
4250d1e132
|
@ -745,6 +745,8 @@ protected
|
|||
|
||||
# Convert the return value to the native type.
|
||||
parse_response(response.body)
|
||||
rescue ::SocketError
|
||||
raise RuntimeError, "Could not communicate with the opcode service: #{$!.class} #{$!}"
|
||||
ensure
|
||||
client.close
|
||||
end
|
||||
|
@ -813,4 +815,4 @@ end
|
|||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue