Skip to content

Commit cfb81c7

Browse files
Save commitCount when response says to
1 parent 0831ade commit cfb81c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ private function receiveResponse()
707707
// are talking to.
708708
// We only set it if process time was returned, which means we did a write. We don't care about saving the commit
709709
// count for reads, since we did not change anything in the DB.
710-
if (isset($responseHeaders['commitCount']) && (($responseHeaders['processTime'] ?? 0) > 0 || ($responseHeaders['upstreamProcessTime'] ?? 0) > 0)) {
710+
if ($responseHeaders['shouldSaveCommitCount'] ?? false || (isset($responseHeaders['commitCount']) && (($responseHeaders['processTime'] ?? 0) > 0 || ($responseHeaders['upstreamProcessTime'] ?? 0) > 0))) {
711711
$this->commitCount = (int) $responseHeaders['commitCount'];
712712
}
713713

0 commit comments

Comments
 (0)