From: Uri Guttman Date: Wed, 5 Aug 2009 21:23:34 +0000 (-0400) Subject: added check for connected when triggered method is called. can't trigger X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd113ec41c91797a1b0f1db80fd720f883afe97e;p=urisagit%2FStem.git added check for connected when triggered method is called. can't trigger if already connected. --- diff --git a/lib/Stem/SockMsg.pm b/lib/Stem/SockMsg.pm index 2accf18..2df2f3b 100644 --- a/lib/Stem/SockMsg.pm +++ b/lib/Stem/SockMsg.pm @@ -159,6 +159,8 @@ INFO } elsif ( $self->{'connect_now'} ) { +#print "NOW\n" ; + $self->connect() ; } @@ -235,6 +237,8 @@ INFO TraceStatus "\n$info" ; +#print "\n$info" ; + if ( my $log_name = $self->{ 'log_name' } ) { #print "MSG LOG\n" ; @@ -264,6 +268,7 @@ sub triggered_cell { my( $self ) = @_ ; #print "SockMsg triggered\n" ; + return if $self->{'connected'} ; return if $self->{'server'} ; # return "SockMsg: can't connect a server socket" if $self->{'server'} ;