~ 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.Write(payload);
payloadStream.Close(); payloadStream.Close();
HttpWebResponse response = updatePost.GetResponse() as HttpWebResponse; updatePost.BeginGetResponse(UpdateBrokerDone, updatePost);
response.Close(); _log.DebugFormat("[Concierge] async broker update to {0} started", _brokerURI);
_log.DebugFormat("[Concierge] broker update: status {0}", response.StatusCode);
} }
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) protected void WelcomeAvatar(ScenePresence agent, Scene scene)
{ {