From 0ede42f90f69434f06908d2a60eca07a26432aab Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Thu, 22 Aug 2002 03:00:28 +0000 Subject: [PATCH] The first part of the patch fixes a likely deadlock in the case when we're destroying a client connection with active calls. The second part fixes a minor connection refcount leak in my recent modification to protect against half-reachable clients. (Note: the first part of this was pulled up a while ago. The second part wasn't, and is being pulled up now.) --- src/rx/rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rx/rx.c b/src/rx/rx.c index 72ed2f01e..1ca01a048 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -4282,12 +4282,15 @@ void rxi_ConnectionError(conn, error) { if (error) { register int i; + MUTEX_ENTER(&conn->conn_data_lock); if (conn->challengeEvent) rxevent_Cancel(conn->challengeEvent, (struct rx_call*)0, 0); if (conn->checkReachEvent) { rxevent_Cancel(conn->checkReachEvent, (struct rx_call*)0, 0); conn->checkReachEvent = 0; + conn->refCount--; } + MUTEX_EXIT(&conn->conn_data_lock); for (i=0; icall[i]; if (call) { -- 2.39.5