Added extra wait on active connection count to decrease to BEH_API_Remove and FUNC_API_Send before resetting state for next test. This should fix a persistently recurring race caused by an ongoing graceful connection close in another thread occurring concurrently to the next test beginning.