Skip to content

Commit 512c9b1

Browse files
committed
Capture RowStreamImpl endHandler in a synchronized block
Follows-up on eclipse-vertx#1577 The endHandler was no longer captured safely after changes in the previous PR. Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
1 parent 95b58c8 commit 512c9b1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vertx-sql-client/src/main/java/io/vertx/sqlclient/impl/RowStreamImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,9 @@ private void checkPending() {
203203
break;
204204
} else {
205205
cursor.close();
206+
final Handler<Void> eh = endHandler;
206207
handler = v -> {
207-
endHandler.handle(null);
208+
eh.handle(null);
208209
synchronized (RowStreamImpl.this) {
209210
cursor = null;
210211
}

0 commit comments

Comments
 (0)