Skip to content

Commit d9f4fb0

Browse files
authored
the shutdownhook should not be a daemon (#888)
1 parent c728c8b commit d9f4fb0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/main/java/com/microsoft/applicationinsights/internal/shutdown/SDKShutdownActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public synchronized void run() {
9797
// For making sure the JVM exists ASAP.
9898
return;
9999
}
100-
100+
InternalLogger.INSTANCE.info("Shutting down Applciation Insights");
101101
try {
102102
stopChannels();
103103
stopStoppables();
@@ -219,7 +219,6 @@ private SDKShutdownAction getShutdownAction() {
219219
try {
220220
shutdownAction = new SDKShutdownAction();
221221
Thread t = new Thread(shutdownAction, SDKShutdownActivity.class.getSimpleName()+"-ShutdownHook");
222-
t.setDaemon(true);
223222
Runtime.getRuntime().addShutdownHook(t);
224223
} catch (Exception e) {
225224
InternalLogger.INSTANCE.error("Error while adding shutdown hook in getShutDownThread call");

0 commit comments

Comments
 (0)