客户端发送$opcode === 0x9时,为什么不把当前连接的pingNotResponseCount = -1呢?
- Dominant language
- PHP
- Stars
- 1k
- Forks
- 291
- PR merge metrics
- No merged PRs in 30d
Description
```php
if ($opcode === 0x9) {
if ($recv_len >= $current_frame_length) {
//****
} else {
//为什么不添加此行呢?
$connection->pingNotResponseCount = -1;
$connection->send($ping_data);
}
$connection->websocketType = $tmp_connection_type;
if ($recv_len > $current_frame_length) {
return static::input(\substr($buffer, $current_frame_length), $connection);
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the PHP WebSocket input handler containing the shown `opcode === 0x9` branch, then trace how `pingNotResponseCount` is updated and consumed for the current connection. Compare the full-frame and partial-frame paths and confirm the intended behavior for an incoming ping before deciding whether the counter should be reset; the issue is done when that behavior is resolved and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100