Skip to content

Commit 7fc7c31

Browse files
authored
fix: main thread fix (#132)
1 parent 340e7f3 commit 7fc7c31

File tree

1 file changed

+4
-0
lines changed
  • src/main/java/io/supertokens/storage/postgresql

1 file changed

+4
-0
lines changed

src/main/java/io/supertokens/storage/postgresql/Start.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ public void initStorage(boolean shouldWait) throws DbInitException {
215215
return;
216216
}
217217
this.isBaseTenant = shouldWait;
218+
if (isBaseTenant) {
219+
// We are doing this so that the tests don't hang on to the first main thread
220+
mainThread = Thread.currentThread();
221+
}
218222
try {
219223
ConnectionPool.initPool(this, shouldWait);
220224
GeneralQueries.createTablesIfNotExists(this);

0 commit comments

Comments
 (0)