Subject: | Potential patch for silent problem sending frame |
Hi,
Whilst this is actually more likely a problem in IO::Socket::INET, I
have hit a bug which in send_frame returns true, if the socket is
created (on new), but then the instance of the mq goes away before a
message is sent.
A quick patch for this tests the socket connection before printing the
frame to the socket
use Carp;
use English qw{-no_match_vars};
sub send_frame {
my ( $self, $frame ) = @_;
# warn "send [" . $frame->as_string . "]\n";
my $sock = $self->socket();
$sock->connected() or croak q{Aborted sending frame, as cannot ping
connection};
my $return = $sock->print( $frame->as_string() ) or croak $EVAL_ERROR;
return $return;
}
Apologies if the RT pool is not the correct place to submit this patch.
I hope it is of some use, and could be worth considering for the next
release. Certainly, it would be very helpful if something could happen
on send of frame to show that it was successfully sent.
Cheers
Andy