ソースを参照

Add exception message to log.

Output will be something line: `Failed to bind to port 1900: Address already in use. DLNA will be unavailable`
Bond-009 6 年 前
コミット
81475e361b
1 ファイル変更2 行追加2 行削除
  1. 2 2
      RSSDP/SsdpCommunicationsServer.cs

+ 2 - 2
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)
                         {