Index: OpenMetaverse/AssetManager.cs =================================================================== --- OpenMetaverse/AssetManager.cs (revision 2085) +++ OpenMetaverse/AssetManager.cs (working copy) @@ -420,7 +420,7 @@ { ImageDownload download = (ImageDownload)transfer; - if (download.TimeSinceLastPacket > 5000) + if (download.TimeSinceLastPacket > 300) { // FIXME: This will probably break on baked textures and doesn't preserve the originally requested discardlevel download.TimeSinceLastPacket = 0; Index: OpenMetaverse/Capabilities/EventQueueClient.cs =================================================================== --- OpenMetaverse/Capabilities/EventQueueClient.cs (revision 2085) +++ OpenMetaverse/Capabilities/EventQueueClient.cs (working copy) @@ -132,44 +132,53 @@ if (e.Error != null) { HttpStatusCode code = HttpStatusCode.OK; - if (e.Error is WebException) - code = ((HttpWebResponse)((WebException)e.Error).Response).StatusCode; - if (code == HttpStatusCode.NotFound || code == HttpStatusCode.Gone) + try { - Logger.Log(String.Format("Closing event queue at {0} due to missing caps URI", _Client.Location), - Helpers.LogLevel.Info); + if (e.Error is WebException) + code = ((HttpWebResponse)((WebException)e.Error).Response).StatusCode; - _Running = false; - _Dead = true; - } - else if (code == HttpStatusCode.BadGateway) - { - // This is not good (server) protocol design, but it's normal. - // The EventQueue server is a proxy that connects to a Squid - // cache which will time out periodically. The EventQueue server - // interprets this as a generic error and returns a 502 to us - // that we ignore - } - else if (!e.Cancelled) - { - // Try to log a meaningful error message - if (code != HttpStatusCode.OK) + if (code == HttpStatusCode.NotFound || code == HttpStatusCode.Gone) { - Logger.Log(String.Format("Unrecognized caps connection problem from {0}: {1}", - _Client.Location, code), Helpers.LogLevel.Warning); + Logger.Log(String.Format("Closing event queue at {0} due to missing caps URI", _Client.Location), + Helpers.LogLevel.Info); + + _Running = false; + _Dead = true; } - else if (e.Error.InnerException != null) + else if (code == HttpStatusCode.BadGateway) { - Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}", - _Client.Location, e.Error.InnerException.Message), Helpers.LogLevel.Warning); + // This is not good (server) protocol design, but it's normal. + // The EventQueue server is a proxy that connects to a Squid + // cache which will time out periodically. The EventQueue server + // interprets this as a generic error and returns a 502 to us + // that we ignore } - else + else if (!e.Cancelled) { - Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}", - _Client.Location, e.Error.Message), Helpers.LogLevel.Warning); + // Try to log a meaningful error message + if (code != HttpStatusCode.OK) + { + Logger.Log(String.Format("Unrecognized caps connection problem from {0}: {1}", + _Client.Location, code), Helpers.LogLevel.Warning); + } + else if (e.Error.InnerException != null) + { + Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}", + _Client.Location, e.Error.InnerException.Message), Helpers.LogLevel.Warning); + } + else + { + Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}", + _Client.Location, e.Error.Message), Helpers.LogLevel.Warning); + } } } + catch (NullReferenceException thenull) + { + // XenReborn: I have no idea what this code for but it was randomly bombing because webexceptiion.response was null + // which caused this exception. + } } else if (!e.Cancelled && e.Result != null) {