lib/bertrpc/action.rb in bertrpc-0.3.0 vs lib/bertrpc/action.rb in bertrpc-0.3.1

- old
+ new

@@ -40,8 +40,10 @@ len = lenheader.unpack('N').first bert_response = sock.read(len) raise ProtocolError.new("Unable to read data from server.") unless bert_response sock.close bert_response + rescue Errno::ECONNREFUSED + raise ConnectionError.new("Unable to connect to #{@svc.host}:#{@svc.port}") end end end \ No newline at end of file