From 0f3152e6acf33b077085446fe8459d90b9d71cd2 Mon Sep 17 00:00:00 2001 From: Stefan Kolb Date: Thu, 13 Jun 2019 23:25:36 +0200 Subject: [PATCH] Shutdown Unirest workers --- src/main/java/org/jabref/Globals.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/jabref/Globals.java b/src/main/java/org/jabref/Globals.java index 1a5cc0ee385..0c26f8f6d38 100644 --- a/src/main/java/org/jabref/Globals.java +++ b/src/main/java/org/jabref/Globals.java @@ -1,6 +1,7 @@ package org.jabref; import java.awt.GraphicsEnvironment; +import java.io.IOException; import java.util.Optional; import java.util.UUID; @@ -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; @@ -125,6 +127,9 @@ public static void shutdownThreadPools() { public static void stopBackgroundTasks() { stopTelemetryClient(); + try { + Unirest.shutdown(); + } catch (IOException ignore) { } } public static Optional getTelemetryClient() {