Skip to content

Commit

Permalink
Fix call static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
luzrain committed Oct 30, 2023
1 parent c445ca7 commit 7d3aa2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Connection/AsyncTcpConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public function checkConnection(): void
// Try to emit protocol::onConnect
if ($this->protocol && method_exists($this->protocol, 'onConnect')) {
try {
$this->protocol->onConnect($this);
$this->protocol::onConnect($this);
} catch (Throwable $e) {
$this->error($e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Connection/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class ConnectionInterface
* Application layer protocol.
* The format is like this Workerman\\Protocols\\Http.
*
* @var ?string
* @var ?class-string
*/
public ?string $protocol = null;

Expand Down
2 changes: 1 addition & 1 deletion src/Connection/TcpConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ public function destroy(): void
// Try to emit protocol::onClose
if ($this->protocol && method_exists($this->protocol, 'onClose')) {
try {
$this->protocol->onClose($this);
$this->protocol::onClose($this);
} catch (Throwable $e) {
$this->error($e);
}
Expand Down

0 comments on commit 7d3aa2e

Please sign in to comment.