@@ -55,14 +55,11 @@ final class Execute {
5555
5656private func startexecution( ) {
5757guard ( stackoftasks? . count?? 0 ) > 0 else { return }
58- streamingHandlers= CreateStreamingHandlers ( ) . createHandlersWithCleanup (
58+ streamingHandlers= CreateStreamingHandlers ( ) . createHandlers (
5959 fileHandler: localfileHandler,
6060 processTermination: { output, hiddenIDin
6161self . processTermination ( stringoutputfromrsync: output, hiddenID)
62- } ,
63- cleanup: { self . activeStreamingProcess= nil
64- self . streamingHandlers= nil
65- SharedReference . shared. updateprocess ( nil ) }
62+ }
6663)
6764
6865if let localhiddenID= stackoftasks? . removeFirst ( ) {
@@ -106,14 +103,11 @@ final class Execute {
106103private func startexecution_noestimate( ) {
107104guard ( stackoftasks? . count?? 0 ) > 0 else { return }
108105
109- streamingHandlers= CreateStreamingHandlers ( ) . createHandlersWithCleanup (
106+ streamingHandlers= CreateStreamingHandlers ( ) . createHandlers (
110107 fileHandler: localfileHandler,
111108 processTermination: { output, hiddenIDin
112109self . processTermination_noestimation ( stringoutputfromrsync: output, hiddenID)
113- } ,
114- cleanup: { self . activeStreamingProcess= nil
115- self . streamingHandlers= nil
116- SharedReference . shared. updateprocess ( nil ) }
110+ }
117111)
118112
119113if let localhiddenID= stackoftasks? . removeFirst ( ) {
@@ -261,6 +255,7 @@ extension Execute {
261255 // Release streaming references when completed
262256 activeStreamingProcess= nil
263257 streamingHandlers= nil
258+ SharedReference . shared. updateprocess ( nil )
264259return
265260}
266261 // Execute next task