From ca68e3c287a8410fbef5280948a6d1d2255e0a89 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 21 Sep 2014 02:39:29 +0200 Subject: iproxy: Disconnect client if no or unmatching device is connected --- tools/iproxy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/iproxy.c b/tools/iproxy.c index 9099917..8d64784 100644 --- a/tools/iproxy.c +++ b/tools/iproxy.c @@ -201,8 +201,11 @@ static void *acceptor_thread(void *arg) } if (dev == NULL || dev->handle == 0) { - printf("No connected/matching device found, terminating.\n"); + printf("No connected/matching device found, disconnecting client.\n"); free(dev_list); + if (cdata->fd > 0) { + close(cdata->fd); + } return NULL; } -- cgit v1.1-32-gdbae