Skip to content

Commit e398c3e

Browse files
committed
Add extra check on connection state in AbstractCursorItemReader#doClose
Issue #868
1 parent 1a6ecfd commit e398c3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/AbstractCursorItemReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ protected void doClose() throws Exception {
398398
rs = null;
399399
cleanupOnClose();
400400

401-
if(this.con != null) {
401+
if(this.con != null && !this.con.isClosed()) {
402402
this.con.setAutoCommit(this.initialConnectionAutoCommit);
403403
}
404404

0 commit comments

Comments
 (0)