Skip to content

Commit

Permalink
fix: make Redis subscriber thread a daemon
Browse files Browse the repository at this point in the history
Should auto-terminate on shutdown now
  • Loading branch information
WiIIiam278 committed Aug 22, 2024
1 parent 7029b50 commit 0a5ad6b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public void initialize() throws IllegalStateException {

// Subscribe using a thread (rather than a task)
subscriber.enable(jedisPool);
new Thread(subscriber::subscribe, "huskhomes:redis_subscriber").start();
final Thread thread = new Thread(subscriber::subscribe, "huskhomes:redis_subscriber");
thread.setDaemon(true);
thread.start();
}

@NotNull
Expand Down

0 comments on commit 0a5ad6b

Please sign in to comment.