Bug 8545 - ZOOM is silent on connection errors
Summary: ZOOM is silent on connection errors
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 9234
  Show dependency treegraph
 
Reported: 2012-08-01 00:02 UTC by Siddhartha Bagaria
Modified: 2012-12-06 17:31 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siddhartha Bagaria 2012-08-01 00:02:01 UTC
In file Context.pm,

        # forge to server
        $Zconn->connect($host, 0);

        # check for errors and warn
        if ($Zconn->errcode() !=0) {
            warn "something wrong with the connection: ". $Zconn->errmsg();
        }

the error checking code does not warn when I change $host to something garbage. The subsequent search query just returns an empty set without any errors.

OS: Ubuntu 12.04
Koha: 3.9-1~git+20120524174206.f9352e89
Zoom: 1.26-1build2

I also checked this on CentOS 6.2 with Koha 3.08.03 and ZOOM installed as the latest version from the latest CPAN (I can check exact version numbers if needed).
Comment 1 Siddhartha Bagaria 2012-08-01 01:49:38 UTC
This is because the error code will not necessarily work in the async mode.
Comment 2 Siddhartha Bagaria 2012-08-01 02:19:35 UTC
(In reply to comment #1)
> This is because the error code will not necessarily work in the async mode.

I was partly wrong above. The eval's catch block is commented out. So the error is not caught immediately. If the async mode is off, then the connect failed error is caught while making the query.