Skip to content

Commit

Permalink
给心跳返回数据增加了type属性
Browse files Browse the repository at this point in the history
  • Loading branch information
RunsTp committed Apr 19, 2018
1 parent abab65a commit c0284c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Server/Socket/Parser/WebSocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class WebSocket implements ParserInterface
public function decode($raw, $client)
{
if ('PING' === $raw) {
return json_encode(['code' => 200, 'message' => 'ok']);
return json_encode(['code' => 200, 'type' => 'heartbeat', 'message' => 'ok']);
}
$commandLine = json_decode($raw, true);
if (!is_array($commandLine)) {
Expand Down

0 comments on commit c0284c2

Please sign in to comment.