@@ -109,7 +109,7 @@ public class OAuth {
|
|||||||
options.callback.openBrowser(deviceTokenResponse.verificationURI);
|
options.callback.openBrowser(deviceTokenResponse.verificationURI);
|
||||||
|
|
||||||
long startTime = System.nanoTime();
|
long startTime = System.nanoTime();
|
||||||
int interval = deviceTokenResponse.interval;
|
long interval = TimeUnit.MILLISECONDS.convert(deviceTokenResponse.interval, TimeUnit.SECONDS);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
Thread.sleep(Math.max(interval, 1));
|
Thread.sleep(Math.max(interval, 1));
|
||||||
@@ -138,7 +138,7 @@ public class OAuth {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ("slow_down".equals(tokenResponse.error)) {
|
if ("slow_down".equals(tokenResponse.error)) {
|
||||||
interval += 5;
|
interval += 5000;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user