tasks/zaproxy.js
function (zaproxy, statusFn, callback) {
    var wait = function () {
      statusFn(function (err, body) {
        if (err) {
          callback(err);
          return;
        }
        if (body.status < 100) {
          grunt.log.write('.');
          setTimeout(function () {
            wait(callback);
          }, 1000);
        } else {
          callback(null, body);
        }
      });
    };
    wait();
  }
function (zaproxy, statusFn, callback) {
    var wait = function () {
      statusFn(function (err, body) {
        if (err) {
          callback(err);
          return;
        }
        if (body.status < 100) {
          grunt.log.write('.');
          setTimeout(function () {
            wait(callback);
          }, 1000);
        } else {
          callback(null, body);
        }
      });
    };
    wait();
  }
function ( zaproxy , statusFn , callback ) { var wait = function ( ) { statusFn ( function ( err , body ) { if ( err ) { callback ( err ) ; return ; } if ( body . status < 100 ) { grunt . log . write ( '.' ) ; setTimeout ( function ( ) { wait ( callback ) ; } , 1000 ) ; } else { callback ( null , body ) ; } } ) ; } ; wait ( ) ; }
Wait for a scan to finish.
Wait for a scan to finish .