Browse Source

Made WeatherClient disposable

LukePulverenti Luke Pulverenti luke pulverenti 13 years ago
parent
commit
8269dba187
1 changed files with 6 additions and 1 deletions
  1. 6 1
      MediaBrowser.Controller/Weather/WeatherClient.cs

+ 6 - 1
MediaBrowser.Controller/Weather/WeatherClient.cs

@@ -15,7 +15,7 @@ namespace MediaBrowser.Controller.Weather
     /// Based on http://www.worldweatheronline.com/free-weather-feed.aspx
     /// The classes in this file are a reproduction of the json output, which will then be converted to our weather model classes
     /// </summary>
-    public class WeatherClient
+    public class WeatherClient : IDisposable
     {
         private HttpClient HttpClient { get; set; }
 
@@ -73,6 +73,11 @@ namespace MediaBrowser.Controller.Weather
 
             return info;
         }
+
+        public void Dispose()
+        {
+            HttpClient.Dispose();
+        }
     }
 
     class WeatherResult