summaryrefslogtreecommitdiff
path: root/minecctl/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'minecctl/misc.c')
-rw-r--r--minecctl/misc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/minecctl/misc.c b/minecctl/misc.c
index bb33161..72eb03c 100644
--- a/minecctl/misc.c
+++ b/minecctl/misc.c
@@ -68,8 +68,13 @@ connect_any(struct list_head *addrs, bool may_fail)
bool connected = false;
int sfd;
- if (list_empty(addrs))
- die("No address to connect to");
+ /* FIXME: check callers and coordinate debug msg */
+ if (list_empty(addrs)) {
+ if (may_fail)
+ return -1;
+ else
+ die("No address to connect to");
+ }
list_for_each_entry(saddr, addrs, list) {
verbose("Attempting connection to %s", saddr->addrstr);