~ turning synchronous broker update into asynchronous one

0.6.3-post-fixes
Dr Scofield 2009-01-26 21:33:36 +00:00
parent 8c4ac64d80
commit 494cfdfe37
1 changed files with 11 additions and 3 deletions

View File

@ -404,11 +404,19 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge
payloadStream.Write(payload);
payloadStream.Close();
HttpWebResponse response = updatePost.GetResponse() as HttpWebResponse;
response.Close();
_log.DebugFormat("[Concierge] broker update: status {0}", response.StatusCode);
updatePost.BeginGetResponse(UpdateBrokerDone, updatePost);
_log.DebugFormat("[Concierge] async broker update to {0} started", _brokerURI);
}
private void UpdateBrokerDone(IAsyncResult result)
{
HttpWebRequest updatePost = result.AsyncState as HttpWebRequest;
using (HttpWebResponse response = updatePost.EndGetResponse(result) as HttpWebResponse)
{
response.Close();
_log.DebugFormat("[Concierge] broker update: status {0}", response.StatusCode);
}
}
protected void WelcomeAvatar(ScenePresence agent, Scene scene)
{