Class: Rack::Response

Inherits:
Object show all
Defined in:
lib/poolparty/monitors/monitor_rack.rb

Overview

We add an after hook to Rack::Response so that we can initiate a connection after The response is sent back to client. PoolParty uses this to update a value, and then pass it on to another node.

Instance Method Summary collapse

Instance Method Details

#closeObject



22
23
24
25
26
# File 'lib/poolparty/monitors/monitor_rack.rb', line 22

def close
  before_close_callbacks.flatten.each {|a| a.call }
  body.close if body.respond_to?(:close)
  after_close_callbacks.flatten.each {|a| a.call }
end