added a thread.Sleep(500) to OGS1GridServices.CheckRegion() , to try to help avoid a potential race condition. As IAsyncResult.AsyncWaitHandle.WaitOne before a AsyncCallback is called. So in this case, its a race to see who sets or reads the bool m_bAvailable first.
parent
5b62491e9f
commit
54eaadeb82
|
@ -1460,6 +1460,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
AsyncCallback ConnectedMethodCallback = new AsyncCallback(ConnectedMethod);
|
||||
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket);
|
||||
System.Threading.Thread.Sleep(500);
|
||||
ar.AsyncWaitHandle.WaitOne(timeOut*1000, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue