From 075b92e7f4804ad5518bef90d1f373aed11b58e9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 4 Mar 2012 13:25:45 -0500 Subject: [PATCH] duplicate the middleware to potentially solve threading conflicts --- lib/rack/livereload.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rack/livereload.rb b/lib/rack/livereload.rb index 6eab424..6ff2f04 100644 --- a/lib/rack/livereload.rb +++ b/lib/rack/livereload.rb @@ -42,6 +42,10 @@ module Rack end def call(env) + dup._call(env) + end + + def _call(env) _, path, file = (env['PATH_INFO'] || '').split('/') if path == '__rack' && ::File.file?(target = ::File.expand_path("../../../js/#{file}", __FILE__))