From 6af3ec5951a2067485a75afd5676c1f732edfdf0 Mon Sep 17 00:00:00 2001 From: Robert Rasmussen Date: Tue, 29 May 2012 12:59:10 -0500 Subject: [PATCH] Fix threadsafety issue, append @app to @ins at initialization rather than at #call. --- lib/omniauth/builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/omniauth/builder.rb b/lib/omniauth/builder.rb index c8d3ef1..6f077a6 100644 --- a/lib/omniauth/builder.rb +++ b/lib/omniauth/builder.rb @@ -8,6 +8,7 @@ module OmniAuth else @app = app super(&block) + @ins << @app end end @@ -44,7 +45,6 @@ module OmniAuth end def call(env) - @ins << @app unless rack14? || @ins.include?(@app) to_app.call(env) end end