Handle socket errors more gracefully

git-svn-id: file:///home/svn/framework3/trunk@5864 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-11-09 23:02:18 +00:00
parent 2d498ed3c5
commit 4250d1e132
1 changed files with 3 additions and 1 deletions

View File

@ -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