From bb2415c77b58bad9d1ab88deb50e239676cb84fe Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 12 Sep 2006 19:15:40 +0000 Subject: [PATCH] Fixed memory leak for closed connections Unrefs connections and close the other end when one end closes the connection. --- improxy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/improxy.c b/improxy.c index b44e797..26c2534 100644 --- a/improxy.c +++ b/improxy.c @@ -25,6 +25,10 @@ void client_event (GConn* conn, GConnEvent* event, gpointer data) break; case GNET_CONN_WRITE: break; + case GNET_CONN_CLOSE: + gnet_conn_unref (server); + gnet_conn_unref (conn); + break; default: fprintf (stderr, "Received an unexpected client event.\n"); break; -- 2.20.1