Skip to content

Commit aff8d8e

Browse files
committed
fix: offset for fetching sessions
1 parent c364b8e commit aff8d8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/browserstack/client/BrowserStackClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public List<Session> getSessions(final String buildId, final BuildStatus status,
461461

462462
// currReq will act as offset to fetch all* sessions from the build
463463
for (int currReq = 0; currReq < totalRequests; currReq++) {
464-
final List<SessionNode> sessionNodes = getSessionNodes(buildId, status, totalLimit, currReq);
464+
final List<SessionNode> sessionNodes = getSessionNodes(buildId, status, totalLimit, currReq * Constants.Filter.MAX_LIMIT);
465465

466466
for (SessionNode sessionNode : sessionNodes) {
467467
if (sessionNode != null && sessionNode.getSession() != null) {

0 commit comments

Comments
 (0)