diff --git a/hio/bin/t04.c b/hio/bin/t04.c index c4d789e..c250417 100644 --- a/hio/bin/t04.c +++ b/hio/bin/t04.c @@ -173,6 +173,7 @@ static void send_test_query (hio_t* hio, const hio_ntime_t* now, hio_tmrjob_t* j hio_bch_t tmp[256]; int len; + HIO_INFO0 (hio, "ATTEMPTING TO SEND QUERY\n"); if (hio_svc_marc_querywithbchars(marc, 0, HIO_SVC_MARC_QTYPE_SELECT, "SHOW STATUS", 11, on_result, HIO_NULL) <= -1) { HIO_INFO1 (hio, "FAILED TO SEND QUERY - %js\n", hio_geterrmsg(hio)); @@ -278,7 +279,7 @@ int main (int argc, char* argv[]) /* ---------------------------------------- */ { hio_ntime_t x; - HIO_INIT_NTIME (&x, 32, 0); + HIO_INIT_NTIME (&x, 20, 0); schedule_timer_job_after (hio, &x, send_test_query, marc); hio_loop (hio); } diff --git a/hio/lib/hio.c b/hio/lib/hio.c index 33daf8d..7107232 100644 --- a/hio/lib/hio.c +++ b/hio/lib/hio.c @@ -942,7 +942,7 @@ void hio_stop (hio_t* hio, hio_stopreq_t stopreq) hio_sys_intrmux (hio); } -int hio_loop (hio_t* hio) +int hio_loop (hio_t* hio/*, int check_svc*/) { HIO_ASSERT (hio, (HIO_FEATURE_ALL & HIO_FEATURE_MUX)); /* never call this if you disableed this feature */ @@ -952,7 +952,8 @@ int hio_loop (hio_t* hio) if (hio_prologue(hio) <= -1) return -1; - while (hio->stopreq == HIO_STOPREQ_NONE && !HIO_DEVL_IS_EMPTY(&hio->actdev)) + while (hio->stopreq == HIO_STOPREQ_NONE && + (!HIO_DEVL_IS_EMPTY(&hio->actdev) || hio->tmr.size > 0)) { if (__exec(hio) <= -1) break; /* you can do other things here */