Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Commit

Permalink
Fix slow display (#44)
Browse files Browse the repository at this point in the history
fixes #41
  • Loading branch information
Heer0 authored and PeterStaev committed Jun 14, 2018
1 parent 7fafa4e commit ddf9dce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public ListenableFuture<JSONObject[]> getProducts(final String type) {
public JSONObject[] call() throws Exception {
// Wait for the service to be initialized (if call too soon after constructor)
int loop = 0;
while (_service == null || loop < 20) {
while (_service == null && loop < 20) {
Thread.sleep(500);
loop++;
}
Expand Down Expand Up @@ -125,7 +125,7 @@ public ListenableFuture<Integer> consumePurchase(final String token) {
public Integer call() throws Exception {
// Wait for the service to be initialized (if call too soon after constructor)
int loop = 0;
while (_service == null || loop < 20) {
while (_service == null && loop < 20) {
Thread.sleep(500);
loop++;
}
Expand Down

0 comments on commit ddf9dce

Please sign in to comment.