Blob Blame History Raw
From 0cb9637f1962ad6be9e977b4b971b823af407c2d Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Thu, 14 May 2020 16:42:32 +0200
Subject: [PATCH 3/3] fix ruby daemon closing connection after 30s

---
 pcs/daemon/ruby_pcsd.py | 2 +-
 pcsd/rserver.rb         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pcs/daemon/ruby_pcsd.py b/pcs/daemon/ruby_pcsd.py
index 53c53eaf..b640752d 100644
--- a/pcs/daemon/ruby_pcsd.py
+++ b/pcs/daemon/ruby_pcsd.py
@@ -127,7 +127,7 @@ class Wrapper:
 
     def prepare_curl_callback(self, curl):
         curl.setopt(pycurl.UNIX_SOCKET_PATH, self.__pcsd_ruby_socket)
-        curl.setopt(pycurl.TIMEOUT, 70)
+        curl.setopt(pycurl.TIMEOUT, 0)
 
     async def send_to_ruby(self, request: RubyDaemonRequest):
         try:
diff --git a/pcsd/rserver.rb b/pcsd/rserver.rb
index 4b58f252..08eceb79 100644
--- a/pcsd/rserver.rb
+++ b/pcsd/rserver.rb
@@ -63,7 +63,7 @@ use TornadoCommunicationMiddleware
 require 'pcsd'
 
 ::Rack::Handler.get('thin').run(Sinatra::Application, {
-  :Host => PCSD_RUBY_SOCKET,
+  :Host => PCSD_RUBY_SOCKET, :timeout => 0
 }) do |server|
   puts server.class
   server.threaded = true
-- 
2.25.4