@@ -69,8 +69,8 @@ public SimpleConnection makeConnection(
69
69
final Set <SimpleConnection > allCreatedConnections ) throws RuntimeException
70
70
{
71
71
boolean isHttps = uri .getScheme ().equalsIgnoreCase ("https" );
72
- XnioWorker worker = getWorker (isHttp2 );
73
- XnioSsl ssl = getSSL (isHttps , isHttp2 );
72
+ XnioWorker worker = getWorker ();
73
+ XnioSsl ssl = getSSL (isHttps );
74
74
OptionMap connectionOptions = getConnectionOptions (isHttp2 );
75
75
InetSocketAddress bindAddress = null ;
76
76
@@ -138,10 +138,9 @@ private static OptionMap getConnectionOptions(boolean isHttp2) {
138
138
* WARNING: This is called by getSSL(). Therefore, this method must never
139
139
* call getSSL(), or any method that transitively calls getSSL()
140
140
*
141
- * @param isHttp2 if true, sets worker thread names to show HTTP2
142
141
* @return new XnioWorker
143
142
*/
144
- private static XnioWorker getWorker (boolean isHttp2 )
143
+ private static XnioWorker getWorker ()
145
144
{
146
145
if (WORKER .get () != null ) return WORKER .get ();
147
146
@@ -151,7 +150,7 @@ private static XnioWorker getWorker(boolean isHttp2)
151
150
152
151
Xnio xnio = Xnio .getInstance (Undertow .class .getClassLoader ());
153
152
try {
154
- WORKER .set (xnio .createWorker (null , getWorkerOptionMap (isHttp2 )));
153
+ WORKER .set (xnio .createWorker (null , getWorkerOptionMap ()));
155
154
} catch (IOException e ) {
156
155
logger .error ("Exception while creating new XnioWorker" , e );
157
156
throw new RuntimeException (e );
@@ -160,13 +159,13 @@ private static XnioWorker getWorker(boolean isHttp2)
160
159
return WORKER .get ();
161
160
}
162
161
163
- private static OptionMap getWorkerOptionMap (boolean isHttp2 )
162
+ private static OptionMap getWorkerOptionMap ()
164
163
{
165
164
OptionMap .Builder optionBuild = OptionMap .builder ()
166
165
.set (Options .WORKER_IO_THREADS , 8 )
167
166
.set (Options .TCP_NODELAY , true )
168
167
.set (Options .KEEP_ALIVE , true )
169
- .set (Options .WORKER_NAME , isHttp2 ? "Callback-HTTP2" : "Callback-HTTP11 " );
168
+ .set (Options .WORKER_NAME , "simplepool " );
170
169
return optionBuild .getMap ();
171
170
}
172
171
@@ -176,10 +175,9 @@ private static OptionMap getWorkerOptionMap(boolean isHttp2)
176
175
* WARNING: This calls getWorker()
177
176
*
178
177
* @param isHttps true if this is an HTTPS connection
179
- * @param isHttp2 if true, sets worker thread names to show HTTP2
180
178
* @return new XnioSSL
181
179
*/
182
- private static XnioSsl getSSL (boolean isHttps , boolean isHttp2 )
180
+ private static XnioSsl getSSL (boolean isHttps )
183
181
{
184
182
if (!isHttps ) return null ;
185
183
if (SSL .get () != null ) return SSL .get ();
@@ -189,7 +187,7 @@ private static XnioSsl getSSL(boolean isHttps, boolean isHttp2)
189
187
if (SSL .get () != null ) return SSL .get ();
190
188
191
189
try {
192
- SSL .set (new UndertowXnioSsl (getWorker (isHttp2 ).getXnio (), OptionMap .EMPTY , BUFFER_POOL , SimpleSSLContextMaker .createSSLContext ()));
190
+ SSL .set (new UndertowXnioSsl (getWorker ().getXnio (), OptionMap .EMPTY , BUFFER_POOL , SimpleSSLContextMaker .createSSLContext ()));
193
191
} catch (Exception e ) {
194
192
logger .error ("Exception while creating new shared UndertowXnioSsl used to create connections" , e );
195
193
throw new RuntimeException (e );
0 commit comments