From 494cfdfe373787b0e71cdf7fd2e98b92ca8f61f4 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 26 Jan 2009 21:33:36 +0000 Subject: ~ turning synchronous broker update into asynchronous one --- .../Modules/Avatar/Concierge/ConciergeModule.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs index 35d1905..297913e 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs @@ -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) { -- cgit v1.1