Method: Puppet::HTTP::Response#drain
- Defined in:
- lib/puppet/http/response.rb
#drain ⇒ Object
Ensure the response body is fully read so that the server is not blocked waiting for us to read data from the socket. Also if the caller streamed the response, but didn’t read the data, we need a way to drain the socket before adding the connection back to the connection pool, otherwise the unread response data would “leak” into the next HTTP request/response.
100 101 102 103 |
# File 'lib/puppet/http/response.rb', line 100 def drain body true end |