kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 071fc4100d9fb8d052377afc26b83fafead3dfad
parent a41a792303716a120b31d3314c2e4edfded13ab7
Author: Joris Vink <joris@coders.se>
Date:   Mon, 29 Apr 2013 07:15:14 +0200

only clear our a netbuf if retain is 0 AND it's been filled.

Diffstat:
src/net.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/net.c b/src/net.c @@ -186,7 +186,7 @@ net_recv(struct connection *c) r = nb->cb(nb); nb->retain--; - if (nb->retain == 0) { + if (nb->retain == 0 && nb->offset == nb->len) { free(nb->buf); free(nb); }