lib/zabbixapi/client.rb in zabbixapi-0.5.1a vs lib/zabbixapi/client.rb in zabbixapi-0.5.1b
- old
+ new
@@ -3,11 +3,11 @@
class ZabbixApi
class Client
def id
- @id = @id + 1
+ rand(100000)
end
def api_version
@version ||= api_request(:method => "apiinfo.version", :params => {})
end
@@ -22,10 +22,9 @@
)
end
def initialize(options = {})
@options = options
- @id = 1
unless ENV['http_proxy'].nil?
@proxy_uri = URI.parse(ENV['http_proxy'])
@proxy_host = @proxy_uri.host
@proxy_port = @proxy_uri.port
@proxy_user, @proxy_pass = @proxy_uri.userinfo.split(/:/) if @proxy_uri.userinfo