]> 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 10:26:16 +0000 (11:26 +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.

(cherry picked from commit ee359d6ffa701e5f9781ec75622af22736506bdd)

lib/isc/tests/netmgr_test.c

index 41113ab7c847624bfb2e9a23dc46ecce57ab9369..50890e0ab572ec85de38ab412d89014fbbed2768 100644 (file)
@@ -418,6 +418,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);
@@ -529,6 +530,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);
                }