lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Markham <dmark...@gmail.com>
Subject [lucy-dev] [patch] for ClusterSearcher.pm
Date Tue, 15 Nov 2011 06:49:33 GMT
Non-Blocking for mortals.

Index: ClusterSearcher.pm
===================================================================
--- ClusterSearcher.pm  (revision 1202059)
+++ ClusterSearcher.pm  (working copy)
@@ -35,7 +35,6 @@
 
 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 @@
         my $sock = IO::Socket::INET->new(
             PeerAddr => $shard,
             Proto    => 'tcp',
+            Blocking => 1,
         );
         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;
     }



-Dan

Mime
View raw message