View | Details | Raw Unified | Return to bug 34070
Collapse All | Expand All

(-)a/Koha/BackgroundJob.pm (-4 / +9 lines)
Lines 89-98 sub connect { Link Here
89
89
90
    try {
90
    try {
91
        $stomp = Net::Stomp->new( { hostname => $hostname, port => $port } );
91
        $stomp = Net::Stomp->new( { hostname => $hostname, port => $port } );
92
        $stomp->connect($credentials);
92
        my $connected_frame = $stomp->connect($credentials);
93
        if ( $connected_frame->command ne 'CONNECTED' ) {
94
            my $message = $connected_frame->body;
95
            chomp $message;
96
            warn sprintf "Cannot connect to broker (%s)", $message;
97
            undef $stomp;
98
        }
93
    } catch {
99
    } catch {
94
        warn "Cannot connect to broker " . $_;
100
        warn sprintf "Cannot connect to broker (%s)", $_;
95
        $stomp = undef;
101
        undef $stomp;
96
    };
102
    };
97
103
98
    return $stomp;
104
    return $stomp;
99
- 

Return to bug 34070