Skip to content

Client#readStringUntil only ever returns first element #23

Description

@DarkEyeDragon

When testing the following code i came to the conclusion that only ever one element is returned for Client#readStringUntil

client.readByteAlways(opCode -> {
    if (opCode == 2) {
        List<String> tempWarps = new ArrayList<>();
        client.readString(s -> {
            client.readInt(warpSize -> {
                AtomicInteger count = new AtomicInteger(0);
               //this part
                client.readStringUntil(s1 -> {
                    tempWarps.add(s1);
                    return warpSize < count.getAndIncrement();
                });
            });
            serverWarps.put(s, tempWarps);
        });
    }
});

it seems to ignore the return value. if i swap < for > the result is the same.

I also tried using client.readStringAlways but this messes up when new packets are received as they're still getting handled in the readStringAlways

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions