diff options
author | Diva Canto | 2013-07-17 15:04:27 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-17 15:04:27 -0700 |
commit | 71278919575b0e0222cdbe3c0cefa5919f9a75bc (patch) | |
tree | 2113ec68aa50170bb694eeb0d72303fc0209154b /OpenSim | |
parent | Revert "Do the same trick that dahlia did for Dequeue(timeout)" (diff) | |
download | opensim-SC-71278919575b0e0222cdbe3c0cefa5919f9a75bc.zip opensim-SC-71278919575b0e0222cdbe3c0cefa5919f9a75bc.tar.gz opensim-SC-71278919575b0e0222cdbe3c0cefa5919f9a75bc.tar.bz2 opensim-SC-71278919575b0e0222cdbe3c0cefa5919f9a75bc.tar.xz |
Revert "Putting the requests back in the queue while testing for count >0 is not the smartest move..."
This reverts commit f4317dc26d670c853d0ea64b401b00f718f09474.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index c50df5a..4cb551c 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -126,22 +126,18 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
126 | Thread.Sleep(1000); | 126 | Thread.Sleep(1000); |
127 | Watchdog.UpdateThread(); | 127 | Watchdog.UpdateThread(); |
128 | 128 | ||
129 | List<PollServiceHttpRequest> not_ready = new List<PollServiceHttpRequest>(); | 129 | PollServiceHttpRequest req; |
130 | lock (m_longPollRequests) | 130 | lock (m_longPollRequests) |
131 | { | 131 | { |
132 | while (m_longPollRequests.Count > 0 && m_running) | 132 | while (m_longPollRequests.Count > 0 && m_running) |
133 | { | 133 | { |
134 | PollServiceHttpRequest req = m_longPollRequests.Dequeue(); | 134 | req = m_longPollRequests.Dequeue(); |
135 | if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id) || // there are events in this EQ | 135 | if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id) || // there are events in this EQ |
136 | (Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) // no events, but timeout | 136 | (Environment.TickCount - req.RequestTime) > req.PollServiceArgs.TimeOutms) // no events, but timeout |
137 | m_requests.Enqueue(req); | 137 | m_requests.Enqueue(req); |
138 | else | 138 | else |
139 | not_ready.Add(req); | 139 | m_longPollRequests.Enqueue(req); |
140 | } | 140 | } |
141 | |||
142 | foreach (PollServiceHttpRequest req in not_ready) | ||
143 | m_longPollRequests.Enqueue(req); | ||
144 | |||
145 | } | 141 | } |
146 | } | 142 | } |
147 | } | 143 | } |