aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-11-03 13:26:49 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2017-11-03 13:26:49 +0100
commit7ffecab08bf91e26ffedb393d9b8cb6151e2b836 (patch)
tree6a204d20263e06b057e9927b8ccdb787556b713b
parent674b01ab9887d7c16b674e32365c7ab1386ecc77 (diff)
afb-proto-ws: Fix unclosed file descriptor
Change-Id: I3c831b4f803e283fc692fef66621a798a5e9296e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-proto-ws.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/afb-proto-ws.c b/src/afb-proto-ws.c
index 3c8922cd..09039763 100644
--- a/src/afb-proto-ws.c
+++ b/src/afb-proto-ws.c
@@ -1059,6 +1059,7 @@ static void on_hangup(void *closure)
}
if (protows->fd >= 0) {
+ close(protows->fd);
protows->fd = -1;
if (protows->on_hangup)
protows->on_hangup(protows->closure);