Skip to content

Commit

Permalink
fix npe when enable the testWhileIdle parameter
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
ylinzhu committed Dec 22, 2023
1 parent 26dd566 commit 6069c38
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ public void okResponse(byte[] ok, AbstractService service) {
}
return;
}

heartbeatTimeout.cancel();
listener.onHeartbeatSuccess((PooledConnection) service.getConnection());
if (!heartbeatTimeout.isExpired()) {
listener.onHeartbeatSuccess((PooledConnection) service.getConnection());
}
}

@Override
Expand Down

0 comments on commit 6069c38

Please sign in to comment.