Skip to content

Commit

Permalink
Shutdown Unirest workers
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Jun 13, 2019
1 parent 5642a39 commit 0f3152e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/jabref/Globals.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.jabref;

import java.awt.GraphicsEnvironment;
import java.io.IOException;
import java.util.Optional;
import java.util.UUID;

Expand All @@ -24,6 +25,7 @@
import org.jabref.preferences.JabRefPreferences;

import com.google.common.base.StandardSystemProperty;
import com.mashape.unirest.http.Unirest;
import com.microsoft.applicationinsights.TelemetryClient;
import com.microsoft.applicationinsights.TelemetryConfiguration;
import com.microsoft.applicationinsights.internal.shutdown.SDKShutdownActivity;
Expand Down Expand Up @@ -125,6 +127,9 @@ public static void shutdownThreadPools() {

public static void stopBackgroundTasks() {
stopTelemetryClient();
try {
Unirest.shutdown();
} catch (IOException ignore) { }
}

public static Optional<TelemetryClient> getTelemetryClient() {
Expand Down

0 comments on commit 0f3152e

Please sign in to comment.