Skip to content

Commit

Permalink
Show bad package stack
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Jan 3, 2024
1 parent 0c0ac0d commit 8fa5b79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Connection/TcpConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
namespace Workerman\Connection;

use JsonSerializable;
use RuntimeException;
use stdClass;
use Throwable;
use Workerman\Events\EventInterface;
Expand Down Expand Up @@ -684,7 +685,7 @@ public function baseRead($socket, bool $checkEof = true): void
}
} // Wrong package.
else {
Worker::safeEcho('Error package. package_length=' . var_export($this->currentPackageLength, true));
Worker::safeEcho((string)(new RuntimeException("Protocol $this->protocol Error package. package_length=" . var_export($this->currentPackageLength, true))));
$this->destroy();
return;
}
Expand Down

0 comments on commit 8fa5b79

Please sign in to comment.