From 632e7da1acbfd81ccd107a0500b296d20fad436c Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 13 May 2002 21:24:01 +0000 Subject: [PATCH] fixed udp shutdown in ~cac --- src/ca/cac.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index b0cd0a230..216fe946d 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -217,15 +217,15 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : cac::~cac () { + // this blocks until the UDP thread exits so that + // it will not sneak in any new clients // // lock intentionally not held here so that we dont deadlock // waiting for the UDP thread to exit while it is waiting to // get the lock. - - // this blocks until the UDP thread exits so that - // it will not sneak in any new clients - delete this->pudpiiu; - this->pudpiiu = 0; // for initiateAbortShutdown() + if ( this->pudpiiu ) { + this->pudpiiu->shutdown (); + } // // shutdown all tcp connections @@ -254,6 +254,10 @@ cac::~cac () this->iiuUninstall.wait (); } + if ( this->pudpiiu ) { + delete this->pudpiiu; + } + freeListCleanup ( this->tcpSmallRecvBufFreeList ); freeListCleanup ( this->tcpLargeRecvBufFreeList );