Public Instance methods
finish!()
[show source]
# File lib/httpx/plugins/hedging.rb 195 def finish! 196 connection = @request.connection 197 198 super 199 200 return unless connection && (hedge_connection = connection.hedge_connection) 201 202 # disconnect connection with its hedge, so that objects do not leak after 203 # they're not needed. 204 connection.hedge_connection = hedge_connection.hedge_connection = nil 205 206 # remarking itself as the main connection, so that it's not discarded when 207 # going back to the pool. 208 connection.is_hedge_connection = false 209 hedge_connection.is_hedge_connection = true 210 end