lib/bluepill/socket.rb in ra-bluepill-0.0.44 vs lib/bluepill/socket.rb in ra-bluepill-0.0.45
- old
+ new
@@ -1,22 +1,29 @@
require 'socket'
module Bluepill
module Socket
+<<<<<<< HEAD
TIMEOUT = 10
RETRY = 5
@@timeout = 0
+=======
+>>>>>>> akzhan
extend self
def client(base_dir, name, &b)
UNIXSocket.open(socket_path(base_dir, name), &b)
end
+<<<<<<< HEAD
def client_command(base_dir, name, command)
+=======
+ def client_command(base_dir, name, command, timeout)
+>>>>>>> akzhan
client(base_dir, name) do |socket|
- Timeout.timeout(TIMEOUT) do
+ Timeout.timeout(timeout) do
socket.puts command
Marshal.load(socket)
end
end
rescue EOFError, Timeout::Error
@@ -52,5 +59,9 @@
def socket_path(base_dir, name)
File.join(base_dir, 'socks', name + ".sock")
end
end
end
+<<<<<<< HEAD
+=======
+
+>>>>>>> akzhan