commit | 5c2ad3b632789551f85a332fb43842b3d40fb4c5 | [log] [tgz] |
---|---|---|
author | Ken Gilmer <kgilmer@apache.org> | Tue Dec 20 18:30:57 2011 +0000 |
committer | Ken Gilmer <kgilmer@apache.org> | Tue Dec 20 18:30:57 2011 +0000 |
tree | 9d746a2b3532e94fe38a72294116c85abfa8fcbd | |
parent | 10dfc3282aa032d3487d5d7ec5288c66a654821e [diff] |
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