From 1565f7536e82898b3ad9c1cc3828dc4843d85ab9 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 17 Jun 2022 07:44:39 +0000 Subject: [PATCH] fixed a sample program --- hio/bin/t06.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hio/bin/t06.c b/hio/bin/t06.c index 3a1afe6..7662385 100644 --- a/hio/bin/t06.c +++ b/hio/bin/t06.c @@ -643,8 +643,8 @@ int main (int argc, char* argv[]) sleep (1); /* TODO: use pthread_cond_wait()/pthread_cond_signal() or a varialble to see if all threads are up */ /* TODO: wait until all threads are ready to serve... */ - if (add_listener(hio, "[::]:9987") <= -1 || - add_listener(hio, "0.0.0.0:9987") <= -1) goto oops; + if (add_listener(hio, "[::]:9987") <= -1 && + add_listener(hio, "0.0.0.0:9987") <= -1) goto oops; /* as long as 1 listener is alive */ /* add a unix socket listener. * don't check for an error to continue without it in case it fails. */