Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 00faff7

Browse files
committed
Setting defaults to current connection count
1 parent f3b0608 commit 00faff7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Statistics/Logger/RedisStatisticsLogger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function connection($appId)
8383
$currentPeakConnectionCount = $this->redis->hget($this->getHash($appId), 'peak_connection_count');
8484

8585
$peakConnectionCount = is_null($currentPeakConnectionCount)
86-
? 1
86+
? $currentConnectionCount
8787
: max($currentPeakConnectionCount, $currentConnectionCount);
8888

8989
$this->redis->hset($this->getHash($appId), 'peak_connection_count', $peakConnectionCount);
@@ -103,7 +103,7 @@ public function disconnection($appId)
103103
$currentPeakConnectionCount = $this->redis->hget($this->getHash($appId), 'peak_connection_count');
104104

105105
$peakConnectionCount = is_null($currentPeakConnectionCount)
106-
? 0
106+
? $currentConnectionCount
107107
: max($currentPeakConnectionCount, $currentConnectionCount);
108108

109109
$this->redis->hset($this->getHash($appId), 'peak_connection_count', $peakConnectionCount);

0 commit comments

Comments
 (0)