File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
httpclient5-testing/src/test/java/org/apache/hc/client5/testing Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 2727
2828package org .apache .hc .client5 .testing ;
2929
30+ import org .apache .commons .io .IOUtils ;
3031import org .apache .hc .client5 .http .async .methods .SimpleHttpRequest ;
3132import org .apache .hc .client5 .http .async .methods .SimpleHttpResponse ;
3233import org .apache .hc .client5 .http .async .methods .SimpleRequestBuilder ;
@@ -90,13 +91,8 @@ void setup() throws Exception {
9091 @ AfterEach
9192 void tearDown () throws Exception {
9293 final SocketChannel socket = currentConnection .getAndSet (null );
93- if (socket != null ) {
94- socket .close ();
95- }
96-
97- if (serverSocket != null ) {
98- serverSocket .close ();
99- }
94+ IOUtils .closeQuietly (socket );
95+ IOUtils .closeQuietly (serverSocket );
10096 if (serverThread != null ) {
10197 serverThread .interrupt ();
10298 serverThread .join (1000 );
You can’t perform that action at this time.
0 commit comments