0

My task is this, after subscribing to a topic using mosquitto_sub, it is necessary to close the connection or kill the process if there is no answer for more than n seconds. I'm not an expert in bash, please help.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • The [`timeout`](https://man7.org/linux/man-pages/man1/timeout.1.html) command is part of GNU `coreutils` and will be available on almost all Linux distributions. – larsks May 28 '22 at 17:53
  • If l can get this reopened I'll answers this properly, but the `-W` and `-c` combined will solve this specifically for `mosquitto_sub` http://mosquitto.org/man/mosquitto_sub-1.html – hardillb May 31 '22 at 08:50

0 Answers0