Skip to content

Commit aed13fb

Browse files
committed
Regression: fix reintroduction of #876
1 parent ff5d00b commit aed13fb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/org/firebirdsql/gds/ng/wire/AbstractFbWireStatement.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,15 @@ private static final class CleanupAction implements Runnable, StatementListener,
229229
private static final AtomicReferenceFieldUpdater<CleanupAction, FbWireDatabase> databaseUpdater =
230230
AtomicReferenceFieldUpdater.newUpdater(CleanupAction.class, FbWireDatabase.class, "database");
231231

232+
233+
private static final DeferredAction CLEANUP_FREE_DEFERRED_ACTION = new DeferredAction() {
234+
@Override
235+
public boolean requiresSync() {
236+
// Server defers response to free, and must be synced
237+
return true;
238+
}
239+
};
240+
232241
private final int handle;
233242
private volatile FbWireDatabase database;
234243

@@ -284,7 +293,7 @@ public void run() {
284293
xdrOut.flush();
285294
});
286295
// TODO: This may process deferred actions on the cleaner thread, we may want to change that
287-
database.enqueueDeferredAction(DeferredAction.NO_OP_INSTANCE);
296+
database.enqueueDeferredAction(CLEANUP_FREE_DEFERRED_ACTION);
288297
} catch (SQLException | IOException e) {
289298
System.getLogger(getClass().getName()).log(System.Logger.Level.TRACE,
290299
"Ignored exception during statement clean up", e);

0 commit comments

Comments
 (0)