Skip to content

Commit d434e0d

Browse files
authored
Optimized Hyperf\WebSocketClient\Client::push() (#3597)
1 parent b3f9a4b commit d434e0d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Client.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ public function recv(float $timeout = -1)
7575
*/
7676
public function push(string $data, int $opcode = WEBSOCKET_OPCODE_TEXT, int $flags = null): bool
7777
{
78-
if (isset($flags)) {
79-
return $this->client->push($data, $opcode, $flags);
80-
}
81-
return $this->client->push($data, $opcode);
78+
return $this->client->push($data, $opcode, $flags);
8279
}
8380

8481
public function close(): bool

0 commit comments

Comments
 (0)