diff options
Diffstat (limited to 'sample')
-rw-r--r-- | sample/ws-chat-server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sample/ws-chat-server.c b/sample/ws-chat-server.c index 4a2c8fa0..9f7941e4 100644 --- a/sample/ws-chat-server.c +++ b/sample/ws-chat-server.c @@ -202,6 +202,8 @@ on_html(struct evhttp_request *req, void *arg) err: evhttp_send_error(req, HTTP_NOTFOUND, NULL); + if (fd >= 0) + close(fd); } #ifndef EVENT__HAVE_STRSIGNAL |