File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
main/java/org/kohsuke/github Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -501,6 +501,7 @@ private InputStream wrapStream(InputStream in) throws IOException {
501501
502502 if ("0" .equals (uc .getHeaderField ("X-RateLimit-Remaining" ))) {
503503 root .rateLimitHandler .onError (e ,uc );
504+ return ;
504505 }
505506
506507 InputStream es = wrapStream (uc .getErrorStream ());
Original file line number Diff line number Diff line change 11import org .kohsuke .github .GHRepository ;
2+ import org .kohsuke .github .GHUser ;
23import org .kohsuke .github .GitHub ;
34
45import java .util .Collection ;
@@ -14,4 +15,11 @@ public static void main(String[] args) throws Exception {
1415 }
1516 System .out .println (lst .size ());
1617 }
18+
19+ private static void testRateLimit () throws Exception {
20+ GitHub g = GitHub .connectAnonymously ();
21+ for (GHUser u : g .getOrganization ("jenkinsci" ).listMembers ()) {
22+ u .getFollowersCount ();
23+ }
24+ }
1725}
You can’t perform that action at this time.
0 commit comments