[banshee] [BaseHttpServer] Nicer logging when can't bind port



commit 58d6ace9897b4d29bd5dab6808a5dfa7b0564bf8
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Dec 10 16:36:49 2009 -0800

    [BaseHttpServer] Nicer logging when can't bind port

 .../Banshee.Services/Banshee.Web/BaseHttpServer.cs |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Web/BaseHttpServer.cs b/src/Core/Banshee.Services/Banshee.Web/BaseHttpServer.cs
index ae8e2c3..572351e 100644
--- a/src/Core/Banshee.Services/Banshee.Web/BaseHttpServer.cs
+++ b/src/Core/Banshee.Services/Banshee.Web/BaseHttpServer.cs
@@ -188,7 +188,11 @@ namespace Banshee.Web
             try {
                 server.Bind (this.EndPoint);
             } catch (System.Net.Sockets.SocketException e) {
-                Log.Exception (e);
+                if (e.SocketErrorCode == SocketError.AddressAlreadyInUse && this.EndPoint is IPEndPoint) {
+                    Log.InformationFormat ("Unable to bind {0} to port {1}", name, (EndPoint as IPEndPoint).Port);
+                } else {
+                    Log.Exception (e);
+                }
                 return false;
             }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]