Skip to content

Commit e55721c

Browse files
authored
[HttpServer] Use HandlerCollection instead of HandlerList for dynamic handler registration (#320)
1 parent 7bdec8d commit e55721c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sensorhub-core/src/main/java/org/sensorhub/impl/service/HttpServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import org.eclipse.jetty.server.ServerConnector;
4242
import org.eclipse.jetty.server.SslConnectionFactory;
4343
import org.eclipse.jetty.server.handler.ContextHandler;
44+
import org.eclipse.jetty.server.handler.HandlerCollection;
4445
import org.eclipse.jetty.server.handler.HandlerList;
4546
import org.eclipse.jetty.server.handler.ResourceHandler;
4647
import org.eclipse.jetty.servlet.*;
@@ -117,7 +118,7 @@ protected synchronized void doStart() throws SensorHubException
117118
server = new Server();
118119
ServerConnector http = null;
119120
ServerConnector https = null;
120-
HandlerList handlers = new HandlerList();
121+
HandlerCollection handlers = new HandlerCollection(true);
121122

122123
// HTTP connector
123124
HttpConfiguration httpConfig = new HttpConfiguration();

0 commit comments

Comments
 (0)