summaryrefslogtreecommitdiff
path: root/rbot/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rbot/utils.rb')
-rw-r--r--rbot/utils.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/rbot/utils.rb b/rbot/utils.rb
index 36276e8d..b22a417d 100644
--- a/rbot/utils.rb
+++ b/rbot/utils.rb
@@ -162,11 +162,11 @@ module Irc
proxy_port = proxy_uri.port
end
- http = Net::HTTP.new(uri.host, uri.port, proxy_host, proxy_port)
- http.open_timeout = opentimeout
- http.read_timeout = readtimeout
-
begin
+ http = Net::HTTP.new(uri.host, uri.port, proxy_host, proxy_port)
+ http.open_timeout = opentimeout
+ http.read_timeout = readtimeout
+
http.start {|http|
resp = http.get(query)
if resp.code == "200"