From 49281424aed515b4c04ea0ad2c859757b1f56984 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 3 Mar 2004 01:58:45 +0000 Subject: [PATCH] bugfix: close_immediate called buf_clear but listeners don't have bufs svn:r1202 --- src/or/connection.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/or/connection.c b/src/or/connection.c index e81635a110..e0e29cfcae 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -155,8 +155,10 @@ void connection_close_immediate(connection_t *conn) } close(conn->s); conn->s = -1; - buf_clear(conn->outbuf); - conn->outbuf_flushlen = 0; + if(!connection_is_listener(conn)) { + buf_clear(conn->outbuf); + conn->outbuf_flushlen = 0; + } } int