diff options
author | MW | 2008-04-16 15:49:28 +0000 |
---|---|---|
committer | MW | 2008-04-16 15:49:28 +0000 |
commit | 54eaadeb8276f77c597044f2eb537db05fbbdb84 (patch) | |
tree | c96d61d202909da7ae3738809ec13acfc5289b72 /OpenSim/Region/Communications | |
parent | Update svn properties. (diff) | |
download | opensim-SC-54eaadeb8276f77c597044f2eb537db05fbbdb84.zip opensim-SC-54eaadeb8276f77c597044f2eb537db05fbbdb84.tar.gz opensim-SC-54eaadeb8276f77c597044f2eb537db05fbbdb84.tar.bz2 opensim-SC-54eaadeb8276f77c597044f2eb537db05fbbdb84.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/Communications')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 8c40d3e..43bba8b 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -1460,6 +1460,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1460 | AsyncCallback ConnectedMethodCallback = new AsyncCallback(ConnectedMethod); | 1460 | AsyncCallback ConnectedMethodCallback = new AsyncCallback(ConnectedMethod); |
1461 | Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | 1461 | Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
1462 | IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket); | 1462 | IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket); |
1463 | System.Threading.Thread.Sleep(500); | ||
1463 | ar.AsyncWaitHandle.WaitOne(timeOut*1000, false); | 1464 | ar.AsyncWaitHandle.WaitOne(timeOut*1000, false); |
1464 | } | 1465 | } |
1465 | 1466 | ||