issue 1 fixed for username nad password authentication

This commit is contained in:
Salman Zafar 2019-03-30 21:49:08 +05:00
parent a214988d8c
commit d8a5ddc3f2
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class Mqtt
{
$client = new MqttService($this->host,$this->port, rand(0,100), $this->cert_file, $this->debug);
if ($client->connect(true))
if ($client->connect(true, null, $this->username, $this->password))
{
$client->publish($topic,$msg);
$client->close();