File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
vertx-mssql-client/src/main/java/io/vertx/mssqlclient/impl/codec
vertx-mysql-client/src/main/java/io/vertx/mysqlclient/impl/codec Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1414import io .netty .buffer .ByteBufAllocator ;
1515import io .netty .channel .ChannelHandlerContext ;
1616import io .netty .channel .CombinedChannelDuplexHandler ;
17+ import io .vertx .core .Completable ;
1718import io .vertx .sqlclient .ClosedConnectionException ;
18- import io .vertx .sqlclient .internal .command .CommandBase ;
19- import io .vertx .sqlclient .internal .command .CommandResponse ;
2019
2120import java .util .ArrayDeque ;
2221import java .util .HashMap ;
@@ -66,9 +65,10 @@ private void fail(Throwable cause) {
6665 }
6766
6867 private void fail (MSSQLCommandCodec <?, ?> codec , Throwable cause ) {
69- CommandResponse <Object > failure = CommandResponse .failure (cause );
70- failure .cmd = (CommandBase ) codec .cmd ;
71- chctx .fireChannelRead (failure );
68+ Completable <?> handler = codec .cmd .handler ;
69+ if (handler != null ) {
70+ handler .complete (null , cause );
71+ }
7272 }
7373
7474 @ Override
Original file line number Diff line number Diff line change 1818
1919import io .netty .channel .ChannelHandlerContext ;
2020import io .netty .channel .CombinedChannelDuplexHandler ;
21+ import io .vertx .core .Completable ;
2122import io .vertx .mysqlclient .impl .MySQLSocketConnection ;
2223import io .vertx .sqlclient .ClosedConnectionException ;
2324import io .vertx .sqlclient .internal .command .CommandBase ;
@@ -80,9 +81,10 @@ private void clearInflightCommands(Throwable cause) {
8081 private void fail (CommandCodec <?, ?> codec , Throwable cause ) {
8182 if (failure == null ) {
8283 failure = cause ;
83- CommandResponse <Object > failure = CommandResponse .failure (cause );
84- failure .cmd = (CommandBase ) codec .cmd ;
85- chctx .fireChannelRead (failure );
84+ Completable <?> handler = codec .cmd .handler ;
85+ if (handler != null ) {
86+ handler .complete (null , cause );
87+ }
8688 }
8789 }
8890
You can’t perform that action at this time.
0 commit comments