You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/11/15 07:59:34 UTC
[lucy-commits] svn commit: r1202069 -
/incubator/lucy/trunk/perl/lib/LucyX/Remote/ClusterSearcher.pm
Author: marvin
Date: Tue Nov 15 06:59:34 2011
New Revision: 1202069
URL: http://svn.apache.org/viewvc?rev=1202069&view=rev
Log:
"Non-blocking for mortals"
Replace godawful fcntl call with sane constructor argument.
Submitted by: Dan Markham
Modified:
incubator/lucy/trunk/perl/lib/LucyX/Remote/ClusterSearcher.pm
Modified: incubator/lucy/trunk/perl/lib/LucyX/Remote/ClusterSearcher.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/LucyX/Remote/ClusterSearcher.pm?rev=1202069&r1=1202068&r2=1202069&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/LucyX/Remote/ClusterSearcher.pm (original)
+++ incubator/lucy/trunk/perl/lib/LucyX/Remote/ClusterSearcher.pm Tue Nov 15 06:59:34 2011
@@ -35,7 +35,6 @@ our %sock_map;
use IO::Socket::INET;
use IO::Select;
-use Fcntl qw( F_GETFL F_SETFL O_NONBLOCK );
sub new {
my ( $either, %args ) = @_;
@@ -54,12 +53,9 @@ sub new {
my $sock = IO::Socket::INET->new(
PeerAddr => $shard,
Proto => 'tcp',
+ Blocking => 0,
);
confess("No socket: $!") unless $sock;
- my $flags = fcntl( $sock, F_GETFL, 0 )
- or confess "Can't get socket flags: $!";
- fcntl( $sock, F_SETFL, $flags | O_NONBLOCK )
- or confess "Can't set socket flags: $!";
push @$socks, $sock;
}