File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
java/server/src/org/openqa/grid/web Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 38
38
import org .seleniumhq .jetty9 .server .Server ;
39
39
import org .seleniumhq .jetty9 .server .ServerConnector ;
40
40
import org .seleniumhq .jetty9 .servlet .ServletContextHandler ;
41
+ import org .seleniumhq .jetty9 .util .thread .QueuedThreadPool ;
41
42
42
43
import java .net .MalformedURLException ;
43
44
import java .net .URL ;
@@ -106,7 +107,13 @@ public Hub(GridHubConfiguration config) {
106
107
107
108
private void initServer () {
108
109
try {
109
- server = new Server ();
110
+ if (maxThread >0 ){
111
+ QueuedThreadPool pool = new QueuedThreadPool ();
112
+ pool .setMaxThreads (maxThread );
113
+ server = new Server (pool );
114
+ } else {
115
+ server = new Server ();
116
+ }
110
117
111
118
HttpConfiguration httpConfig = new HttpConfiguration ();
112
119
httpConfig .setSecureScheme ("https" );
@@ -182,11 +189,6 @@ public String getHost() {
182
189
183
190
public void start () throws Exception {
184
191
initServer ();
185
- // if (maxThread>0){
186
- // QueuedThreadPool pool = new QueuedThreadPool();
187
- // pool.setMaxThreads(maxThread);
188
- // server.setThreadPool(pool);
189
- // }
190
192
server .start ();
191
193
}
192
194
You can’t perform that action at this time.
0 commit comments