From 133dad7305ab8ba2153600d25323919223ed0edc Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sat, 10 Sep 2011 09:56:34 +0000 Subject: [PATCH] Tweak PeerGroup thread priority. Resolves issue 67. --- src/com/google/bitcoin/core/PeerGroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/google/bitcoin/core/PeerGroup.java b/src/com/google/bitcoin/core/PeerGroup.java index 822323d7..f2e70c80 100644 --- a/src/com/google/bitcoin/core/PeerGroup.java +++ b/src/com/google/bitcoin/core/PeerGroup.java @@ -402,7 +402,7 @@ public class PeerGroup { // Lower the priority of the peer threads. This is to avoid competing with UI threads created by the API // user when doing lots of work, like downloading the block chain. We select a priority level one lower // than the parent thread, or the minimum. - t.setPriority(Math.max(Thread.MIN_PRIORITY, group.getMaxPriority() - 1)); + t.setPriority(Math.max(Thread.MIN_PRIORITY, Thread.currentThread().getPriority() - 1)); t.setDaemon(true); return t; }