about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/dtas/unix_client.rb2
-rw-r--r--lib/dtas/unix_server.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/dtas/unix_client.rb b/lib/dtas/unix_client.rb
index fa8b11c..dfde59b 100644
--- a/lib/dtas/unix_client.rb
+++ b/lib/dtas/unix_client.rb
@@ -17,7 +17,7 @@ class DTAS::UNIXClient # :nodoc:
   end
 
   def initialize(path = self.class.default_path)
-    @to_io = Socket.new(:AF_UNIX, :SOCK_SEQPACKET, 0)
+    @to_io = Socket.new(:UNIX, :SEQPACKET, 0)
     @to_io.connect(Socket.pack_sockaddr_un(path))
   end
 
diff --git a/lib/dtas/unix_server.rb b/lib/dtas/unix_server.rb
index bccfad5..21261d3 100644
--- a/lib/dtas/unix_server.rb
+++ b/lib/dtas/unix_server.rb
@@ -26,13 +26,13 @@ class DTAS::UNIXServer # :nodoc:
     # lock down access by default, arbitrary commands may run as the
     # same user dtas-player runs as:
     old_umask = File.umask(0077)
-    @to_io = Socket.new(:AF_UNIX, :SOCK_SEQPACKET, 0)
+    @to_io = Socket.new(:UNIX, :SEQPACKET, 0)
     addr = Socket.pack_sockaddr_un(path)
     begin
       @to_io.bind(addr)
     rescue Errno::EADDRINUSE
       # maybe we have an old path leftover from a killed process
-      tmp = Socket.new(:AF_UNIX, :SOCK_SEQPACKET, 0)
+      tmp = Socket.new(:UNIX, :SEQPACKET, 0)
       begin
         tmp.connect(addr)
         raise RuntimeError, "socket `#{path}' is in use", []