- /* Throw Database unavailable if other than Default */
- if (yaz_matchstr (rr->basenames[0], "Default"))
+ /* Throw Database unavailable if other than Default or Slow */
+ if (!yaz_matchstr (rr->basenames[0], "Default"))
+ ; /* Default is OK in our test */
+ else if(!yaz_matchstr (rr->basenames[0], "Slow"))
+ {
+#if HAVE_UNISTD_H
+ /* wait up to 3 seconds and check if connection is still alive */
+ int i;
+ for (i = 0; i<3; i++)
+ {
+ if (!bend_assoc_is_alive(rr->association))
+ {
+ yaz_log(YLOG_LOG, "search aborted");
+ break;
+ }
+ sleep(1);
+ }
+#endif
+ rr->estimated_hit_count = 1;
+ }
+ else