Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor .close() not finishes in case of multiple close attempts #1410

Open
FDoKE opened this issue Feb 20, 2024 · 0 comments
Open

Cursor .close() not finishes in case of multiple close attempts #1410

FDoKE opened this issue Feb 20, 2024 · 0 comments
Labels
Milestone

Comments

@FDoKE
Copy link

FDoKE commented Feb 20, 2024

Version

4.5.3

Context

CursorImpl.close never finishes promise in case of it's already closed, all logic in !closed branch.

  private synchronized void close(Promise<Void> promise) {
    if (!closed) {
....

Steps to reproduce

sqlConnection.prepare("select * from test")
        .compose(preparedStatement ->
        {
            Cursor cursor = preparedStatement.cursor();
            return cursor.read(1)
                    .compose(rowSet -> {
                        Future<Void> close1 = cursor.close();
                        Future<Void> close2 = cursor.close();
                        return Future.join(close1, close2)
                                .onComplete(ar -> {
                                    // never gets called
                                });
                    });
        });
@FDoKE FDoKE added the bug label Feb 20, 2024
@vietj vietj modified the milestones: 4.5.4, 4.5.5 Feb 20, 2024
@vietj vietj modified the milestones: 4.5.5, 4.5.6 Mar 14, 2024
@vietj vietj modified the milestones: 4.5.6, 4.5.7, 4.5.8 Mar 21, 2024
@vietj vietj modified the milestones: 4.5.8, 4.5.9 May 24, 2024
@vietj vietj modified the milestones: 4.5.9, 4.5.10 Jul 17, 2024
@vietj vietj modified the milestones: 4.5.10, 4.5.11 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants