Last active
August 29, 2015 14:16
-
-
Save guilleiguaran/c720d1d4cb591ef27d32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gctools/oobgc' | |
module GC | |
module OOB | |
module PumaMiddleware | |
def self.new(app) | |
ObjectSpace.each_object(Puma::Server) do |s| | |
s.extend(self) | |
end | |
app | |
end | |
def process_client(client, buffer) | |
super(client, buffer) # Puma::Server#process_client | |
GC::OOB.run | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment