# Mosquitto\_sub -W does not work

**URL:** <https://forum.cedalo.com/t/mosquitto-sub-w-does-not-work/363>\
**Category:** Errors\
**Created:** [October 19, 2021, 7:05pm UTC](https://forum.cedalo.com/t/mosquitto-sub-w-does-not-work/363 "2021-10-19T19:05:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tomas](https://forum.cedalo.com/u/Tomas)\
**Post date:** [October 19, 2021, 7:05pm UTC](https://forum.cedalo.com/t/mosquitto-sub-w-does-not-work/363/1 "2021-10-19T19:05:37Z")

</div>

Hi  
According to this page [mosquitto\_sub man page | Eclipse Mosquitto](https://mosquitto.org/man/mosquitto_sub-1.html)  
there should be the option -W that should be an integer for timeout. And I realy need a timeout.  
But it doesent work with my mosquitto at least 2.0.11

I run a temporary script to check doorsignals. Maybe not the smartest way but it works… untill one vehicle doesnt have a topic to send. I would like to use count and timeout. If it counts 10 then fine but if it doesent after like 3 seconds then close it.

$Dvehicle = & ‘C:\Program Files\mosquitto\mosquitto\_sub.exe’ -t infohub/sensors/door/# -h x.x.x.x -v -C 10 -W 3  
$do=$null  
$Cdoornumbers=$null  
ForEach ($line in $Dvehicle){  
$line\_split = $line -split ‘doorOpen":’  
$dn = $line\_split -split ‘,“doorLocked”:’  
$Cdooropen =$dn[1]  
if($Cdooropen -ne $null){$do++}  
}  
$Cdoornumbers

Also a powershell timeout dosent seem to work either for some reason. maybee because of calling a program “outside” powershell… I dont know

---

<div class="post-metadata">

**Author:** ![roger.light](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@roger.light](https://forum.cedalo.com/u/roger.light)\
**Post date:** [October 20, 2021, 11:30am UTC](https://forum.cedalo.com/t/mosquitto-sub-w-does-not-work/363/2 "2021-10-20T11:30:15Z")

</div>

I’m afraid that the `-W` option isn’t supported on Windows right now. Sorry that wasn’t made clear, and it will be supported in version 2.1.
