mirror of
https://github.com/Luzifer/mqttcli.git
synced 2024-09-19 16:02:58 +00:00
Allow sending empty message
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
f73625ba5b
commit
46ed69eff1
4
main.go
4
main.go
@ -81,10 +81,6 @@ func main() {
|
|||||||
|
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "pub":
|
case "pub":
|
||||||
if cfg.Message == "" {
|
|
||||||
log.Fatal("Empty message on publish")
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := publish(client); err != nil {
|
if err := publish(client); err != nil {
|
||||||
log.WithError(err).Fatal("Failed to publish message")
|
log.WithError(err).Fatal("Failed to publish message")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user