From 79e464f33fa60e5164874e4c3e2a189c52924ae1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 17 Jul 2016 16:16:24 +0100 Subject: [PATCH] dont try dequeues if didnt reacquired lock --- OpenSim/Framework/BlockingQueue.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index daf99a8fbd..f6861e49d2 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs @@ -78,7 +78,8 @@ namespace OpenSim.Framework { if (m_queue.Count < 1 && m_pqueue.Count < 1) { - Monitor.Wait(m_queueSync, msTimeout); + if(!Monitor.Wait(m_queueSync, msTimeout)) + return default(T); } if (m_pqueue.Count > 0)