File tree Expand file tree Collapse file tree
vertx-pg-client/src/main/java/io/vertx/pgclient/impl/codec Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ private void decodeDataRow(ByteBuf in) {
209209 cmd .rowDecoder .handleRow (len , in );
210210 }
211211
212- private void decodeRowDescription (ByteBuf in ) {
212+ private void decodeRowDescription (ByteBuf in ) {
213213 PgColumnDesc [] columns = new PgColumnDesc [in .readUnsignedShort ()];
214214 for (int c = 0 ; c < columns .length ; ++c ) {
215215 String fieldName = Util .readCStringUTF8 (in );
@@ -254,11 +254,15 @@ private void decodeError(ChannelHandlerContext ctx, ByteBuf in) {
254254 switch (response .getCode ()) {
255255 default :
256256 PgCommandCodec <?, ?> cmd = codec .peek ();
257- cmd .handleErrorResponse (response );
257+ if (cmd != null ) {
258+ cmd .handleErrorResponse (response );
259+ }
258260 break ;
259- // Unsolicited errors
261+ // Unsolicited errors
260262 case "57P01" :
261263 // admin_shutdown
264+ case "57P05" :
265+ // terminating connection due to idle-session timeout
262266 case "25P03" :
263267 // terminating connection due to idle-in-transaction timeout
264268 ctx .fireExceptionCaught (response .toException ());
You can’t perform that action at this time.
0 commit comments