Bug 26742: Remove die from connect

The change was not advertised and it needs to be done on a separate bug
report (+ test coverage)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0104de7c22)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2020-12-14 10:05:02 +01:00 committed by Fridolin Somers
parent 9cfbc21443
commit e69545a22b
1 changed files with 1 additions and 7 deletions

View File

@ -77,13 +77,7 @@ sub connect {
$credentials->{host} = $config->{vhost} if $config->{vhost};
}
my $stomp = Net::Stomp->new( { hostname => $hostname, port => $port } );
my $frame = $stomp->connect( $credentials );
unless ($frame && $frame->command eq 'CONNECTED'){
if ($frame){
warn $frame->as_string;
}
die "Cannot connect to message broker";
}
$stomp->connect( $credentials );
return $stomp;
}