felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kgil...@apache.org
Subject svn commit: r1221411 - in /felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite: osgi/HttpServiceFactoryImpl.java server/Server.java
Date Tue, 20 Dec 2011 18:30:58 GMT
Author: kgilmer
Date: Tue Dec 20 18:30:57 2011
New Revision: 1221411

URL: http://svn.apache.org/viewvc?rev=1221411&view=rev
Log:
httplite: ignore socket errors after server is explicitly shutdown.

Modified:
    felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
    felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java

Modified: felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java?rev=1221411&r1=1221410&r2=1221411&view=diff
==============================================================================
--- felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
(original)
+++ felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/osgi/HttpServiceFactoryImpl.java
Tue Dec 20 18:30:57 2011
@@ -134,6 +134,7 @@ public class HttpServiceFactoryImpl impl
             {
                 m_logger.log(Logger.LOG_INFO,
                     "Stopping http server since no clients are registered.");
+                m_server.setStopping();
                 m_server.stop();
             }
             catch (InterruptedException e)

Modified: felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java
URL: http://svn.apache.org/viewvc/felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java?rev=1221411&r1=1221410&r2=1221411&view=diff
==============================================================================
--- felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java
(original)
+++ felix/trunk/httplite/minimum/src/main/java/org/apache/felix/httplite/server/Server.java
Tue Dec 20 18:30:57 2011
@@ -397,14 +397,9 @@ public class Server
     }
 
 	/**
-	 * 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



Mime
View raw message