Land #3184, Rex::Proto::Http::Client IOError fix
commit
9779913060
|
@ -198,7 +198,7 @@ class Client
|
||||||
def close
|
def close
|
||||||
if (self.conn)
|
if (self.conn)
|
||||||
self.conn.shutdown
|
self.conn.shutdown
|
||||||
self.conn.close
|
self.conn.close unless self.conn.closed?
|
||||||
end
|
end
|
||||||
|
|
||||||
self.conn = nil
|
self.conn = nil
|
||||||
|
|
|
@ -112,6 +112,7 @@ describe Rex::Proto::Http::Client do
|
||||||
conn.stub(:put)
|
conn.stub(:put)
|
||||||
conn.stub(:shutdown)
|
conn.stub(:shutdown)
|
||||||
conn.stub(:close)
|
conn.stub(:close)
|
||||||
|
conn.stub(:closed? => false)
|
||||||
|
|
||||||
conn.should_receive(:get_once).and_return(first_response, authed_response)
|
conn.should_receive(:get_once).and_return(first_response, authed_response)
|
||||||
conn.should_receive(:put) do |str_request|
|
conn.should_receive(:put) do |str_request|
|
||||||
|
|
Loading…
Reference in New Issue