From 81475e361b1665f895027feec9b4c0a4553f22dc Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 13 Jan 2019 01:30:43 +0100 Subject: [PATCH] Add exception message to log. Output will be something line: `Failed to bind to port 1900: Address already in use. DLNA will be unavailable` --- RSSDP/SsdpCommunicationsServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index c64b6d02f3..2255ef35ab 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -126,9 +126,9 @@ namespace Rssdp.Infrastructure { _BroadcastListenSocket = ListenForBroadcastsAsync(); } - catch (SocketException) + catch (SocketException ex) { - _logger.LogError("Failed to bind to port 1900. DLNA will be unavailable"); + _logger.LogError("Failed to bind to port 1900: {Message}. DLNA will be unavailable", ex.Message); } catch (Exception ex) {