Example #1
0
  after(function(done) {
    server.close();
    Interactor.killDaemon(function() {
      var fs = require('fs');

      fs.unlinkSync(cst.INTERACTION_CONF);

      pm2.kill();

      pm2.on('exit', function() {done()});
    });
  });
Example #2
0
    device.interface.release(function(err) {
      if (err) {
        return callback(err);
      }

      // release the input and output endpoints
      input = device.input = undefined;
      output = device.output = undefined;

      if (reattach) {
        debug('reattaching kernel driver');
        device.interface.attachKernelDriver();
        reattach = false;
      }

      // release the device reference
      device.interface = undefined;
      device.open = false;

      debug('closing device');
      device.close();
      callback();
    });
Example #3
0
			heartbeatTimer = setTimeout(function() {
				socket.close();
			}, +params.heartbeat);
Example #4
0
 modem.port.on('error', function() {
     modem.close();
 });
Example #5
0
 function onChange (change) {
   if (emitted > opts.limit) return ee.close()
   var c = _.clone(change, true)
   if (opts.include_data) c.data = self.dict[change.id]
   ee.emit()
 }