relay: fix close handling
authorFelix Fietkau <nbd@openwrt.org>
Thu, 23 May 2013 10:41:03 +0000 (12:41 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 23 May 2013 10:41:52 +0000 (12:41 +0200)
commitd58f77ad52caa52e91cf698e60a5a43c5d870e84
tree385d87092fe45e8c0b68595becb095cfd13f8fc2
parent692cb27c49f9c543aef8f25f8c270a27ddec2a74
relay: fix close handling

When the relay process has exited, close the connection as soon as no
data can immediately be read from the socket anymore, and the read
buffer has been emptied.
This fixes timeouts with scripts that leave processes lingering around
without closing their fds.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
relay.c
uhttpd.h