httplite: ignore socket errors after server is explicitly shutdown.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1221411 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java b/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
index 67880e1..8d61bcc 100644
--- a/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
+++ b/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
@@ -134,6 +134,7 @@
             {
                 m_logger.log(Logger.LOG_INFO,
                     "Stopping http server since no clients are registered.");
+                m_server.setStopping();
                 m_server.stop();
             }
             catch (InterruptedException e)
diff --git a/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java b/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java
index 926419d..cef90fb 100644
--- a/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java
+++ b/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java
@@ -397,14 +397,9 @@
     }
 
 	/**
-	 * Sets the stopping flag to true.  Socket exceptions will not be logged.  Method can only be called once.
+	 * Sets the stopping flag to true, meaning that further socket exceptions will not be logged as errors.
 	 */
-	public void setStopping() {
-		if (m_stopping) 
-		{
-			throw new IllegalStateException("setStopping() called multiple times.");
-		}
-		
+	public void setStopping() {		
 		m_stopping  = true;
 	}
 }
\ No newline at end of file