summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sock.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sock.c b/src/sock.c
index d0151c4..e7bd450 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -281,9 +281,16 @@ int listen_sock (const char *addr, uint16_t port, vector_t listen_fds)
vector_append (listen_fds, &listenfd, sizeof(int));
- /* success, don't continue */
+ /* success */
ret = 0;
- break;
+
+ if (addr != NULL) {
+ /*
+ * Unless wildcard is requested, only listen
+ * on the first result that works.
+ */
+ break;
+ }
}
if (ret != 0) {