From 2741f24dffc5ab66e8d19003082ee0bea88c6d72 Mon Sep 17 00:00:00 2001 From: Fredrik Zetterlund Date: Sat, 3 Sep 2016 22:25:21 +0200 Subject: [PATCH] Send response first Respond to message should be highest priority. --- MediaBrowser.Server.Implementations/Udp/UdpServer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Udp/UdpServer.cs b/MediaBrowser.Server.Implementations/Udp/UdpServer.cs index 241ceaf65..d75ea1e00 100644 --- a/MediaBrowser.Server.Implementations/Udp/UdpServer.cs +++ b/MediaBrowser.Server.Implementations/Udp/UdpServer.cs @@ -109,11 +109,6 @@ namespace MediaBrowser.Server.Implementations.Udp { var parts = messageText.Split('|'); - if (parts.Length > 1) - { - _appHost.EnableLoopback(parts[1]); - } - var localUrl = await _appHost.GetLocalApiUrl().ConfigureAwait(false); if (!string.IsNullOrEmpty(localUrl)) @@ -126,6 +121,11 @@ namespace MediaBrowser.Server.Implementations.Udp }; await SendAsync(encoding.GetBytes(_json.SerializeToString(response)), endpoint).ConfigureAwait(false); + + if (parts.Length > 1) + { + _appHost.EnableLoopback(parts[1]); + } } else {