如何解决laravel 5.8 回声服务器尝试验证不存在的通道
好吧,我有这个私人频道,我实际上在一段时间前删除了它,但它一直在尝试对其进行身份验证...
[3:17:38 PM] - EtqURfdxFGpzBmSmAAAA joined channel: public-channel-1
[3:17:41 PM] - Preparing authentication request to: http://localhost.PHP
[3:17:41 PM] - Sending auth request to: http://localhost.PHP/broadcasting/auth
[3:17:41 PM] - Error authenticating MhxVL-RaA6Ca7aN0AAAB for private-live-chat
Error: getaddrinfo ENOTFOUND localhost.PHP
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
errno: -3008,code: 'ENOTFOUND',syscall: 'getaddrinfo',hostname: 'http://localhost.PHP'
}
Error sending authentication request.
所以我删除了私人实时聊天频道并公开了一个,但它一直试图验证它...
<?PHP
namespace App\Events;
use Illuminate\broadcasting\Channel;
use Illuminate\Contracts\broadcasting\Shouldbroadcast;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\dispatchable;
use Illuminate\broadcasting\InteractsWithSockets;
class NewMessageEvent implements Shouldbroadcast
{
use dispatchable,InteractsWithSockets,SerializesModels;
public $username;
public $message;
/**
* Create a new event instance.
*
* @param string $message
* @param string $username
*/
public function __construct(string $message,string $username)
{
$this->username = $username;
$this->message = $message;
}
/**
* Get the channels the event should broadcast on.
*
* @return Channel|array
*/
public function broadcastOn()
{
return new Channel('live-chat');
}
}
我正在为此使用 redis。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。