From a1fe61ba7ce028b2b904b8ee90bcfb47c73bc6c6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 16 Jun 2015 00:31:50 +0000 Subject: favor recv and recv_nonblock over recvmsg variants We never use the full return value of the recvmsg* methods, so those allocations are wasted. --- lib/dtas/unix_accepted.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/dtas/unix_accepted.rb') diff --git a/lib/dtas/unix_accepted.rb b/lib/dtas/unix_accepted.rb index c08d431..a0000cf 100644 --- a/lib/dtas/unix_accepted.rb +++ b/lib/dtas/unix_accepted.rb @@ -56,7 +56,7 @@ class DTAS::UNIXAccepted # :nodoc: begin begin - msg, _, _ = io.recvmsg_nonblock(nread, 0, 0) + msg = io.recv_nonblock(nread) rescue Errno::EAGAIN return :wait_readable rescue EOFError, SystemCallError -- cgit v1.2.3-24-ge0c7