diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 2340998..aad3bd2 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -159,8 +159,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
159 | string filename = string.Empty; | 159 | string filename = string.Empty; |
160 | 160 | ||
161 | try | 161 | try |
162 | { | 162 | { |
163 | WebClient c = new WebClient(); | ||
164 | //m_log.Debug("JPEG: " + imageURL); | 163 | //m_log.Debug("JPEG: " + imageURL); |
165 | string name = regionID.ToString(); | 164 | string name = regionID.ToString(); |
166 | filename = Path.Combine(storagePath, name + ".jpg"); | 165 | filename = Path.Combine(storagePath, name + ".jpg"); |
@@ -168,7 +167,8 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
168 | if (!File.Exists(filename)) | 167 | if (!File.Exists(filename)) |
169 | { | 168 | { |
170 | m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: downloading..."); | 169 | m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: downloading..."); |
171 | c.DownloadFile(imageURL, filename); | 170 | using(WebClient c = new WebClient()) |
171 | c.DownloadFile(imageURL, filename); | ||
172 | } | 172 | } |
173 | else | 173 | else |
174 | { | 174 | { |