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

Commit 3555b47

Browse files
committed
Fixed bug for non-int values
1 parent 3ce5557 commit 3555b47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/WebSockets/WebSocketHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ protected function limitConcurrentConnections(ConnectionInterface $connection)
170170

171171
if ($connectionsCount instanceof PromiseInterface) {
172172
$connectionsCount->then(function ($connectionsCount) use ($capacity, $connection) {
173+
$connectionsCount = $connectionsCount ?: 0;
174+
173175
$this->sendExceptionIfOverCapacity($connectionsCount, $capacity, $connection);
174176
});
175177
} else {

0 commit comments

Comments
 (0)