# HG changeset patch
# User Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
# Date 1689249793 -7200
# Node ID c85c2d90d31f7063588ce3663a1ea552e1fd7f33
# Parent  1b9fe515f574527d73aa32503766ec4bb89ab05d
Improve the implementation of abort() by using the provided Executor object.

diff --git a/src/main/java/org/monetdb/jdbc/MonetConnection.java b/src/main/java/org/monetdb/jdbc/MonetConnection.java
--- a/src/main/java/org/monetdb/jdbc/MonetConnection.java
+++ b/src/main/java/org/monetdb/jdbc/MonetConnection.java
@@ -1585,9 +1585,15 @@ public class MonetConnection
 			return;
 		if (executor == null)
 			throw new SQLException("executor is null", "M1M05");
-		// this is really the simplest thing to do, it destroys
-		// everything (in particular the server connection)
-		close();
+
+		executor.execute(new Runnable() {
+			@Override
+			public void run() {
+				// this is really the simplest thing to do, it destroys
+				// everything (in particular the server connection)
+				close();
+			}
+		});
 	}
 
 	/**