Skip to content

Commit

Permalink
Logic refactor, thanks @gubatron
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Feb 24, 2016
1 parent f971bdc commit d41c00e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/com/frostwire/jlibtorrent/Session.java
Expand Up @@ -837,12 +837,9 @@ public byte[] fetchMagnet(String uri, int timeout) {
}

data = MAGNET_CACHE.get(sha1);
if (data != null) {
break; // aldenml: this in one of those cases in which "break" is more clear to me
}

n++;
} while (n < timeout);
} while (data != null || n < timeout);

synchronized (MAGNET_LOCK) {
if (add && th != null && th.is_valid()) {
Expand Down

0 comments on commit d41c00e

Please sign in to comment.