Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9f9cf4

Browse files
author
Stephane Landelle
committed
Make closeAsynchronously shutdown own thread,closeAsyncHttpClient#458
1 parent321f3c0 commitf9f9cf4

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

‎src/main/java/com/ning/http/client/AsyncHttpClient.java‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -375,17 +375,21 @@ public void close() {
375375
*/
376376
publicvoidcloseAsynchronously() {
377377
finalExecutorServicee =Executors.newSingleThreadExecutor();
378-
e.submit(newRunnable() {
379-
publicvoidrun() {
380-
try {
381-
close();
382-
}catch (Throwablet) {
383-
logger.warn("",t);
384-
}finally {
385-
e.shutdown();
378+
try {
379+
e.submit(newRunnable() {
380+
publicvoidrun() {
381+
try {
382+
close();
383+
}catch (Throwablet) {
384+
logger.warn("",t);
385+
}finally {
386+
e.shutdown();
387+
}
386388
}
387-
}
388-
});
389+
});
390+
}finally {
391+
e.shutdown();
392+
}
389393
}
390394

391395
@Override

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp