Merge pull request #347 from DataDog/gary/shutdown-hook

Fix applications not exiting without explicit exit statement.
This commit is contained in:
Gary Huang 2018-06-13 18:39:59 -04:00 committed by GitHub
commit 36d9eb8660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -184,7 +184,9 @@ public class PendingTrace extends ConcurrentLinkedDeque<DDSpan> {
new ThreadFactory() {
@Override
public Thread newThread(final Runnable r) {
return new Thread(r, "dd-span-cleaner");
final Thread thread = new Thread(r, "dd-span-cleaner");
thread.setDaemon(true);
return thread;
}
};