summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 052c07c)
raw | patch | inline | side by side (parent: 052c07c)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 20 Dec 2013 08:09:59 +0000 (09:09 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 20 Dec 2013 08:09:59 +0000 (09:09 +0100) |
src/frontend/sock.c | patch | blob | history |
diff --git a/src/frontend/sock.c b/src/frontend/sock.c
index 24708db5ca2bb0e6e5dcc61e5c384fe1a03148ff..b5a3dcdd6a2082af6f0b6ab0a75e23fb9a9b99dc 100644 (file)
--- a/src/frontend/sock.c
+++ b/src/frontend/sock.c
}
}
- while (loop->do_loop) {
+ while (loop->do_loop && num_threads) {
struct timeval timeout = { 1, 0 }; /* one second */
sdb_llist_iter_t *iter;
sdb_channel_destroy(sock->chan);
sock->chan = NULL;
+
+ if (! num_threads)
+ return -1;
return 0;
} /* sdb_fe_sock_listen_and_server */