@@ -230,25 +230,26 @@ public function getRunTime()
230230 */
231231 protected function _run ($ callback )
232232 {
233- // get the buffer regardless of wether or not there is a callback as it updates and
234- // checks for the completion of the command.
235- $ buffer = $ this ->getBuffer ();
236-
237- // get the buffer to give to the
238- if ($ callback !== null && is_callable ($ callback ) === true )
239- {
240- call_user_func ($ callback , $ this , $ buffer , false );
241- }
242-
243- // if we have finished running the loop then break here.
244- if ($ this ->_running === false )
245- {
246- return ;
233+ while ($ this ->_running !== false ) {
234+ // get the buffer regardless of wether or not there is a callback as it updates and
235+ // checks for the completion of the command.
236+ $ buffer = $ this ->getBuffer ();
237+
238+ // get the buffer to give to the
239+ if ($ callback !== null && is_callable ($ callback ) === true )
240+ {
241+ call_user_func ($ callback , $ this , $ buffer , false );
242+ }
243+
244+ // if we have finished running the loop then break here.
245+ if ($ this ->_running === false )
246+ {
247+ break ;
248+ }
249+
250+ // still running so wait and then run again.
251+ $ this ->wait ($ this ->_callback_period_interval );
247252 }
248-
249- // still running so wait and then run again.
250- $ this ->wait ($ this ->_callback_period_interval );
251- $ this ->_run ($ callback );
252253 }
253254
254255 /**
0 commit comments