File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
vertx-pg-client/src/main/java/io/vertx/pgclient/impl/codec Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ private void decodeDataRow(ByteBuf in) {
209
209
cmd .rowDecoder .handleRow (len , in );
210
210
}
211
211
212
- private void decodeRowDescription (ByteBuf in ) {
212
+ private void decodeRowDescription (ByteBuf in ) {
213
213
PgColumnDesc [] columns = new PgColumnDesc [in .readUnsignedShort ()];
214
214
for (int c = 0 ; c < columns .length ; ++c ) {
215
215
String fieldName = Util .readCStringUTF8 (in );
@@ -254,11 +254,15 @@ private void decodeError(ChannelHandlerContext ctx, ByteBuf in) {
254
254
switch (response .getCode ()) {
255
255
default :
256
256
PgCommandCodec <?, ?> cmd = codec .peek ();
257
- cmd .handleErrorResponse (response );
257
+ if (cmd != null ) {
258
+ cmd .handleErrorResponse (response );
259
+ }
258
260
break ;
259
- // Unsolicited errors
261
+ // Unsolicited errors
260
262
case "57P01" :
261
263
// admin_shutdown
264
+ case "57P05" :
265
+ // terminating connection due to idle-session timeout
262
266
case "25P03" :
263
267
// terminating connection due to idle-in-transaction timeout
264
268
ctx .fireExceptionCaught (response .toException ());
You can’t perform that action at this time.
0 commit comments