Set lingering with zctx_set_linger() instead of zclock_sleep().