From 03e6e9dfcceead1a4e2c8a2006b607fac996b24d Mon Sep 17 00:00:00 2001 From: Ankit Tiwari Date: Mon, 29 Apr 2024 15:42:17 +0530 Subject: [PATCH] fix: PR changes --- .../io/supertokens/storage/mysql/BulkImportProxyStorage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/supertokens/storage/mysql/BulkImportProxyStorage.java b/src/main/java/io/supertokens/storage/mysql/BulkImportProxyStorage.java index bca7963..0d91d76 100644 --- a/src/main/java/io/supertokens/storage/mysql/BulkImportProxyStorage.java +++ b/src/main/java/io/supertokens/storage/mysql/BulkImportProxyStorage.java @@ -87,7 +87,9 @@ public void closeConnectionForBulkImportProxyStorage() throws StorageQueryExcept @Override public void commitTransactionForBulkImportProxyStorage() throws StorageQueryException { try { - this.connection.commitForBulkImportProxyStorage(); + if (this.connection != null) { + this.connection.commitForBulkImportProxyStorage(); + } } catch (SQLException e) { throw new StorageQueryException(e); }