summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/iproxy.c5
1 files changed, 4 insertions, 1 deletions
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;
}