|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2020 IBM Corporation and others. |
| 2 | + * Copyright (c) 2020, 2021 IBM Corporation and others. |
3 | 3 | * All rights reserved. This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License v1.0 |
5 | 5 | * which accompanies this distribution, and is available at |
|
52 | 52 | import org.apache.hc.core5.http2.impl.nio.H2StreamListener; |
53 | 53 | import org.apache.hc.core5.http2.impl.nio.bootstrap.H2RequesterBootstrap; |
54 | 54 | import org.apache.hc.core5.http2.ssl.H2ClientTlsStrategy; |
| 55 | +import org.apache.hc.core5.io.CloseMode; |
55 | 56 | import org.apache.hc.core5.net.NamedEndpoint; |
56 | 57 | import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier; |
57 | 58 | import org.apache.hc.core5.reactor.ssl.TlsDetails; |
@@ -114,8 +115,7 @@ public List<String> makeSecureRequests(String host, int port, String[] requestUr |
114 | 115 | latch.await(29, TimeUnit.SECONDS); |
115 | 116 |
|
116 | 117 | LOGGER.logp(Level.INFO, CLASS_NAME, "drivePushRequests", "requests complete, shutting down client"); |
117 | | - requester.initiateShutdown(); |
118 | | - requester.awaitShutdown(TimeValue.ofSeconds(10)); |
| 118 | + requester.close(CloseMode.GRACEFUL); |
119 | 119 | logResponseMessages(responseMessages); |
120 | 120 | LOGGER.logp(Level.INFO, CLASS_NAME, "drivePushRequests", "client shutdown complete, returning"); |
121 | 121 | return responseMessages; |
|
0 commit comments