* Catch a WebException in the LoadImageURLModule

0.6.1-post-fixes
Teravus Ovares 2008-12-18 08:50:25 +00:00
parent f4acaafd3a
commit eb777b7373
1 changed files with 39 additions and 32 deletions

View File

@ -133,7 +133,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
{
RequestState state = (RequestState) result.AsyncState;
WebRequest request = (WebRequest) state.Request;
HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result);
try
{
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);
if (response.StatusCode == HttpStatusCode.OK)
{
Bitmap image = new Bitmap(response.GetResponseStream());
@ -171,6 +173,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
m_textureManager.ReturnData(state.RequestID, imageJ2000);
}
}
catch (WebException)
{
}
}
#region Nested type: RequestState