about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/yahns/http_response.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb
index 05923c9..65ecdff 100644
--- a/lib/yahns/http_response.rb
+++ b/lib/yahns/http_response.rb
@@ -15,6 +15,13 @@ require_relative 'wbuf_str'
 module Yahns::HttpResponse # :nodoc:
   include Unicorn::HttpResponse
 
+  if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
+    MTX = Mutex.new
+    def httpdate
+      MTX.synchronize { super }
+    end
+  end
+
   # avoid GC overhead for frequently used-strings:
   CONN_KA = "Connection: keep-alive\r\n\r\n"
   CONN_CLOSE = "Connection: close\r\n\r\n"