From 0ca76597e507bae3ee8713ccf55ff530a7a98978 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 fb13298eef..f526673660 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -129,9 +129,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) {