Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the POE-Component-MessageQueue CPAN distribution.

Report information
The Basics
Id: 43149
Status: new
Priority: 0/
Queue: POE-Component-MessageQueue

People
Owner: Nobody in particular
Requestors: ashleyb.moniker [...] gmail.com
Cc:
AdminCc:

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



Subject: mq.pl (POE::Component::MessageQueue) doesn't exit if the STOMP server port is already in use.
Date: Mon, 9 Feb 2009 09:25:34 -0800
To: bug-POE-Component-MessageQueue [...] rt.cpan.org
From: ashleyb <ashleyb.moniker [...] gmail.com>
- Bug in version: POE::Component::MessageQueue version 0.2.5 - how to recreate: start two mq.pl servers on the default port... the second one will not exit properly if bind fails. Following is a patch for this, also, you may want to review this comment in light of this: POE::Component::Server::Stomp : 89: " # POE::Component::Server::TCP does it ! So, I do it too." *** /usr/local/share/perl/5.8.8/POE/Component/MessageQueue.pm 2009-02-09 09:16:20.000000000 -0800 --- /tmp/MessageQueue.pm 2009-02-09 09:16:12.000000000 -0800 *************** *** 170,175 **** --- 170,176 ---- HandleFrame => sub { $self->_handle_frame(@_) }, ClientDisconnected => sub { $self- Show quoted text
>_client_disconnected(@_) },
ClientError => sub { $self->_client_error(@_) }, + Error => sub { $self->_server_error(@_) }, ); # a custom session for non-STOMP responsive tasks *************** *** 254,259 **** --- 255,270 ---- } } + sub _server_error + { + my $self = shift; + my ($kernel, $name, $number, $message) = @_[ KERNEL, ARG0, ARG1, ARG2 ]; + + $self->log(error => "STOMP Server error: $name ($number) '$message'" ); + print "STOMP Server error: $name ($number) '$message'\n"; + exit; + } + sub _shutdown_complete { my ($self) = @_;