diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Udp/UdpServer.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Udp/UdpServer.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/Udp/UdpServer.cs b/MediaBrowser.Server.Implementations/Udp/UdpServer.cs index 40c4deb19..32992b9b2 100644 --- a/MediaBrowser.Server.Implementations/Udp/UdpServer.cs +++ b/MediaBrowser.Server.Implementations/Udp/UdpServer.cs @@ -96,20 +96,20 @@ namespace MediaBrowser.Server.Implementations.Udp private async void RespondToV1Message(string endpoint, Encoding encoding) { - var localAddress = _appHost.LocalApiUrl; + var localUrl = await _appHost.GetLocalApiUrl().ConfigureAwait(false); - if (!string.IsNullOrEmpty(localAddress)) + if (!string.IsNullOrEmpty(localUrl)) { // This is how we did the old v1 search, so need to strip off the protocol - var index = localAddress.IndexOf("://", StringComparison.OrdinalIgnoreCase); + var index = localUrl.IndexOf("://", StringComparison.OrdinalIgnoreCase); if (index != -1) { - localAddress = localAddress.Substring(index + 3); + localUrl = localUrl.Substring(index + 3); } // Send a response back with our ip address and port - var response = String.Format("MediaBrowserServer|{0}", localAddress); + var response = String.Format("MediaBrowserServer|{0}", localUrl); await SendAsync(Encoding.UTF8.GetBytes(response), endpoint); } @@ -121,7 +121,7 @@ namespace MediaBrowser.Server.Implementations.Udp private async void RespondToV2Message(string endpoint, Encoding encoding) { - var localUrl = _appHost.LocalApiUrl; + var localUrl = await _appHost.GetLocalApiUrl().ConfigureAwait(false); if (!string.IsNullOrEmpty(localUrl)) { |
