# setShutdownClient(true) takes 90 seconds to stop/destroy RTMP connection

**URL:** <https://community.wowza.com/t/setshutdownclient-true-takes-90-seconds-to-stop-destroy-rtmp-connection/51658>\
**Category:** Wowza Streaming Engine\
**Created:** [July 23, 2018, 5:44pm UTC](https://community.wowza.com/t/setshutdownclient-true-takes-90-seconds-to-stop-destroy-rtmp-connection/51658 "2018-07-23T17:44:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremy\_Weatherford](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@Jeremy\_Weatherford](https://community.wowza.com/u/Jeremy_Weatherford)\
**Post date:** [July 23, 2018, 5:44pm UTC](https://community.wowza.com/t/setshutdownclient-true-takes-90-seconds-to-stop-destroy-rtmp-connection/51658/1 "2018-07-23T17:44:52Z")

</div>

I need to programmatically stop VOD access to a certain file so it can be deleted or renamed. I find the active streams using AppInstance.getStreams, find the ones I want to kill, and call stream.getClient().setShutdownClient(true). 90 seconds later Wowza finally shows the stream was stopped and destroyed, and I have access to the file – how can I stop/destroy the stream immediately?

INFO session connect-pending 127.0.0.1 -  
INFO server comment - onConnect: 2078592560  
INFO session connect 127.0.0.1 -  
INFO server comment - onConnectAccept: 2078592560  
INFO stream create - -  
INFO stream play 2018/LF2-23 2018-06-15.mp4 -  
INFO server comment - APIServer: terminating matched VOD stream: /2018/LF2-23 2018-06-15.mp4 from 127.0.0.1  
INFO server comment - StreamModule: running setShutdownClient(2018/LF2-23 2018-06-15.mp4)

[90 seconds pass]

INFO session comment 2078592560 client connectionClosed [2078592560] watchdog  
INFO stream stop 2018/LF2-23 2018-06-15.mp4 -  
INFO stream destroy 2018/LF2-23 2018-06-15.mp4 -  
INFO session disconnect 2078592560 -  
INFO server comment - onDisconnect: 2078592560
