Explorar o código

Kestrel doesn't like sync IO operations

Bond_009 %!s(int64=5) %!d(string=hai) anos
pai
achega
2610f377c0
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      Emby.Dlna/Service/BaseControlHandler.cs

+ 4 - 2
Emby.Dlna/Service/BaseControlHandler.cs

@@ -63,7 +63,8 @@ namespace Emby.Dlna.Service
                     ValidationType = ValidationType.None,
                     CheckCharacters = false,
                     IgnoreProcessingInstructions = true,
-                    IgnoreComments = true
+                    IgnoreComments = true,
+                    Async = true
                 };
 
                 using (var reader = XmlReader.Create(streamReader, readerSettings))
@@ -79,7 +80,8 @@ namespace Emby.Dlna.Service
             var settings = new XmlWriterSettings
             {
                 Encoding = Encoding.UTF8,
-                CloseOutput = false
+                CloseOutput = false,
+                Async = true
             };
 
             StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8);