summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/net/http.rb4
-rw-r--r--lib/thwait.rb2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 65cd5a9937..447e88c992 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -350,13 +350,11 @@ module Net
@socket.reopen
end
- yield( u_header )
+ resp = yield( u_header )
if ublock then
adapter = HTTPReadAdapter.new( @command )
ublock.call adapter
resp = adapter.off
- else
- resp = @command.get_response
end
unless keep_alive? u_header, resp then
diff --git a/lib/thwait.rb b/lib/thwait.rb
index 8003f0d3c7..3c17009310 100644
--- a/lib/thwait.rb
+++ b/lib/thwait.rb
@@ -96,7 +96,7 @@ class ThreadsWait
# adds thread(s) to join, no wait.
def join_nowait(*threads)
- @threads.concat threads
+ @threads.concat threads.flatten
for th in threads
Thread.start do
th = th.join