Skip to content

Commit 81c6f50

Browse files
committed
Minor bug fix
1 parent 46aba98 commit 81c6f50

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/CloseStatementDB2CommandMessage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class CloseStatementDB2CommandMessage extends DB2CommandMessage<Void, CloseState
2727

2828
@Override
2929
void encode(DB2Encoder encoder) {
30+
super.encode(encoder);
3031
DB2PreparedStatement statement = (DB2PreparedStatement) cmd.statement();
3132
statement.close();
3233
fireCommandSuccess(null);

vertx-db2-client/src/main/java/io/vertx/db2client/impl/codec/DB2Encoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ <R> void fireCommandSuccess(DB2CommandMessage msg, R result) {
7676
@SuppressWarnings({ "unchecked", "rawtypes" })
7777
void write(DB2CommandMessage<?, ?> msg) {
7878
try {
79-
msg.encode(this);
8079
inflight.add(msg);
80+
msg.encode(this);
8181
} catch (Throwable e) {
82+
inflight.pollLast();
8283
LOG.error("FATAL: Unable to encode command: " + msg, e);
8384
chctx.fireChannelRead(CommandResponse.failure(e));
8485
}

0 commit comments

Comments
 (0)