* Apparently the CAPS server does not support keep-alive at all (see http://jira.secondlife.com/browse/SVC-2628), so support for it has been completely disabled and the connection reuse timeout is 100x more aggressive now
* The 502 errors are unofficially part of the protocol (see http://jira.secondlife.com/browse/SVC-2629), so the event queue logging has been cleaned up and no longer emits messages for those. git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1908 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -145,19 +145,39 @@ namespace libsecondlife.Capabilities
|
||||
}
|
||||
else if (!e.Cancelled)
|
||||
{
|
||||
if (Helpers.StringContains(message, "502"))
|
||||
// Figure out what type of error was thrown so we can print a meaningful
|
||||
// error message
|
||||
if (e.Error is WebException)
|
||||
{
|
||||
Logger.DebugLog("502 error from event queue " + _Client.Location);
|
||||
WebException err = (WebException)e.Error;
|
||||
HttpWebResponse errResponse = (HttpWebResponse)err.Response;
|
||||
|
||||
switch (errResponse.StatusCode)
|
||||
{
|
||||
case 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
|
||||
break;
|
||||
default:
|
||||
Logger.Log(String.Format(
|
||||
"Unrecognized caps connection problem from {0}: {1} (Server returned: {2})",
|
||||
_Client.Location, errResponse.StatusCode, errResponse.StatusDescription),
|
||||
Helpers.LogLevel.Warning);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (e.Error.InnerException != null)
|
||||
{
|
||||
Logger.Log("Unrecognized caps exception from " + _Client.Location +
|
||||
": " + e.Error.InnerException.Message, Helpers.LogLevel.Warning);
|
||||
Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}",
|
||||
_Client.Location, e.Error.InnerException.Message), Helpers.LogLevel.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Log("Unrecognized caps exception from " + _Client.Location +
|
||||
": " + e.Error.Message, Helpers.LogLevel.Warning);
|
||||
Logger.Log(String.Format("Unrecognized caps exception from {0}: {1}",
|
||||
_Client.Location, e.Error.Message), Helpers.LogLevel.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user