Unverified Commit 680bcaf5 authored by Marek Szuba's avatar Marek Szuba Committed by GitHub
Browse files

Merge pull request #1 from thibauthourlier/feature/fix_return_or

Fix precedence problem by replacing or with ||
parents 95d83ed4 d587b9c0
......@@ -3,6 +3,7 @@
use strict;
use warnings;
use Carp;
use IO::Handle;
use Getopt::Long;
use Tk;
......@@ -129,8 +130,10 @@ sub zconn {
($self->{zconn}) = @arg;
$self->try_send; # may have been postponed due to lack of zconn
}
return $self->{zconn} or
die "Need zconn set now";
if (!$self->{zconn}) {
confess "Need zconn set now";
}
return $self->{zconn};
}
......@@ -261,8 +264,11 @@ sub new {
sub zconn {
my ($self, @arg) = @_;
($self->{zconn}) = @arg if @arg;
return $self->{zconn} or
die "Need zconn set now";
if (!$self->{zconn}) {
confess "Need zconn set now";
}
return $self->{zconn};
}
sub on_timeout {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment