patch for PoCo::IKC::ClientLite.pm
flw <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Message-ID | <[email protected]> |
When it working with a server which used Non-IKC protocol,
alarm( $self->{connect_timeout} ) will break user process via
SIGALRM(default behaviour)
Following patch is based on:
$Id: ClientLite.pm 495 2009-05-08 19:46:42Z fil $
--- ClientLite.pm.orig 2009-10-14 11:35:38.000000000 +0800
+++ ClientLite.pm 2009-10-14 11:36:06.000000000 +0800
@@ -136,11 +136,11 @@
alarm( $self->{connect_timeout} );
$sock->print('WORLD'); # phase 003
chomp($resp=$sock->getline);
- alarm( 0 );
die "Phase 003: $!\n" unless defined $resp;
die "Didn't get UP from $name\n" unless $resp eq 'UP';
$DONE = 1;
};
+ alarm( 0 );
if($@)
{
$self->{error}=$error=$@;