]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Update writetimeout to be T_IDLE in netmgr_test.c
authorOndřej Surý <ondrej@isc.org>
Thu, 10 Feb 2022 07:42:22 +0000 (08:42 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 17 Feb 2022 08:06:58 +0000 (09:06 +0100)
Use the isc_nmhandle_setwritetimeout() function in the netmgr unit test
to allow more time for writing and reading the responses because some of
the intervals that are used in the unit tests are really small leaving a
little room for any delays.

lib/isc/tests/netmgr_test.c

index 824668d4badf86d625e7fcafaa068fdb2742327c..b27c095b7d1e51b1e6d096e56a0e7055aacf4f9e 100644 (file)
@@ -437,6 +437,7 @@ connect_send(isc_nmhandle_t *handle) {
        isc_nmhandle_t *sendhandle = NULL;
        isc_refcount_increment0(&active_csends);
        isc_nmhandle_attach(handle, &sendhandle);
+       isc_nmhandle_setwritetimeout(handle, T_IDLE);
        if (atomic_fetch_sub(&nsends, 1) > 1) {
                isc_nm_send(sendhandle, (isc_region_t *)&send_msg,
                            connect_send_cb, NULL);
@@ -548,6 +549,7 @@ listen_read_cb(isc_nmhandle_t *handle, isc_result_t eresult,
                        isc_nmhandle_t *sendhandle = NULL;
                        isc_nmhandle_attach(handle, &sendhandle);
                        isc_refcount_increment0(&active_ssends);
+                       isc_nmhandle_setwritetimeout(sendhandle, T_IDLE);
                        isc_nm_send(sendhandle, (isc_region_t *)&send_msg,
                                    listen_send_cb, cbarg);
                }