From 163c619378cab13dce25ab7c933aee34749353ab Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 11 Sep 2009 18:21:57 +0000 Subject: Clean up THTTPD watch handling git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2036 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/netutils/thttpd/thttpd.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'nuttx/netutils/thttpd/thttpd.c') diff --git a/nuttx/netutils/thttpd/thttpd.c b/nuttx/netutils/thttpd/thttpd.c index 224ccd1af..b1e90b6c7 100644 --- a/nuttx/netutils/thttpd/thttpd.c +++ b/nuttx/netutils/thttpd/thttpd.c @@ -565,8 +565,7 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv) conn->linger_timer = NULL; conn->hc->should_linger = FALSE; } - - if (conn->hc->should_linger) + else if (conn->hc->should_linger) { fdwatch_del_fd(fw, conn->hc->conn_fd); conn->conn_state = CNST_LINGERING; @@ -893,14 +892,7 @@ int thttpd_main(int argc, char **argv) if (conn) { hc = conn->hc; - if (!fdwatch_check_fd(fw, hc->conn_fd)) - { - /* Something went wrong */ - - nvdbg("Clearing connection\n"); - clear_connection(conn, &tv); - } - else + if (fdwatch_check_fd(fw, hc->conn_fd)) { nvdbg("Handle conn_state %d\n", conn->conn_state); switch (conn->conn_state) -- cgit v1.2.3