Method: Thin::Connection#terminate_request

Defined in:
lib/thin/connection.rb

#terminate_requestObject

Does request and response cleanup (closes open IO streams and deletes created temporary files). Re-initializes response and request if client supports persistent connection.



145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/thin/connection.rb', line 145

def terminate_request
  unless persistent?
    close_connection_after_writing rescue nil
    close_request_response
  else
    close_request_response
    # Connection become idle but it's still open
    @idle = true
    # Prepare the connection for another request if the client
    # supports HTTP pipelining (persistent connection).
    post_init
  end
end