Skip Menu |

This queue is for tickets about the Net-Stomp CPAN distribution.

Report information
The Basics
Id: 46576
Status: resolved
Priority: 0/
Queue: Net-Stomp

People
Owner: Nobody in particular
Requestors: andyb [...] operamail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.42



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
this was fixed in 0.42; 0.47 will have a smarter handling of connection problems.